Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
Banner Exchange Script?
Old 08-25-2002, 04:51 PM Banner Exchange Script?
Darkfire001's Avatar
Super Talker

Posts: 124
Trades: 0
Ok, I have decided to start programming a Banner Exchange Script from scratch even know my PHP Knowledge is very limited and I am very new to it. Below is my Processing Script which is supposed to 1st, Check to make sure that the Sign-up form feilds have all been filled and Second to Update the MySQL database assuming that thats true. I know I am missing something involving the MySQL database but not sure what. And not sure if I should have the part where it updates the MySQL database seperate. Well here is what I have so Far.

Quote:
<?php

$errors=0
if (!trim($USERNAME))
{
echo "<BR><BR>Username</B> is required.";
$errors++;
}

if (!trim($PASSWORD))
{
echo "<BR><BR>Password</B> is required.";
$errors++;
}

if (!trim($SITENAME))
{
echo "<BR><BR>Sitename</B> is required.";
$errors++;
}

if (!trim($BANNERLOCATION))
{
echo "<BR><BR>Banner URL</B> is required.";
$errors++;
}

if ($errors > 0)
echo "<BR><BR><BR>Please user your browser's back button " .
"to return to the forum, correct ";
if ($errors == 1)
echo "the error, ";
if ($errors > 1)
echo "the errors, ";
if ($errors > 0)
echo "and re-submit the form.";

$db = mysql_connect ("localhost", "darkfire001_darkfire00l", "darkfire001")
if (!$db)
die("Failed to open Database");
mysql_select_db(darkfire_darkfire001)
INSERT INTO usernames (username, password, sitename, bannerlocation) VALUES ($USERNAME, $PASSWORD, $SITENAME, $BANNERLOCATION);

mysql_close();
?>
Any and all help is appreciated.
__________________
******************************
Okay I have finally given into the Darkside, I will now start including my sig on this site.
******************************

Visit
Please login or register to view this content. Registration is FREE
for the Ultimate Videogame Messageboards

******************************
^ LOL Whats with the Asteriks?
Darkfire001 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-25-2002, 07:04 PM
fonzerelli_79's Avatar
Webmaster Talker

Latest Blog Post:
11 Free Twitter Clients
Posts: 731
Location: Sunny Scotland
Trades: 0
your probably better editing the above post so that your password etc arent shown - better playing it safe
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
fonzerelli_79 is offline
Reply With Quote
View Public Profile
 
Old 08-25-2002, 07:13 PM
Darkfire001's Avatar
Super Talker

Posts: 124
Trades: 0
Fronz, I did, LOL why do you think everything says darkfire001?
__________________
******************************
Okay I have finally given into the Darkside, I will now start including my sig on this site.
******************************

Visit
Please login or register to view this content. Registration is FREE
for the Ultimate Videogame Messageboards

******************************
^ LOL Whats with the Asteriks?
Darkfire001 is offline
Reply With Quote
View Public Profile
 
Old 08-26-2002, 03:02 AM
AhmedF's Avatar
Left for Better Places

Posts: 258
Trades: 0
INSERT INTO usernames (username, password, sitename, bannerlocation) VALUES ($USERNAME, $PASSWORD, $SITENAME, $BANNERLOCATION);

what you do is simoethlng iiek

$string = "INSERT INTO usernames (username, password, sitename, bannerlocation) VALUES ($USERNAME, $PASSWORD, $SITENAME, $BANNERLOCATION)";

and then mysql_query($string);

also ... i sugest you read up on indenting

ANd lastly ... mysql.com has Kevin's tutorials on how to writ ea relational database driver website ... WELL worth a read if you are just entering MySQL
AhmedF is offline
Reply With Quote
View Public Profile
 
Old 08-26-2002, 01:57 PM
fonzerelli_79's Avatar
Webmaster Talker

Latest Blog Post:
11 Free Twitter Clients
Posts: 731
Location: Sunny Scotland
Trades: 0
Quote:
Originally posted by Darkfire001
Fronz, I did, LOL why do you think everything says darkfire001?
man i must have been taking the stupid pills that day - lol
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
fonzerelli_79 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Banner Exchange Script?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.15176 seconds with 12 queries