Error 200

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
wlebargy
-


Joined: 24 Nov 2004
Posts: 1

PostPosted: Thu Jun 02, 2005 7:52 pm    Post subject: Error 200 Reply with quote

Code:
<?              $name = $_REQUEST['name'];
      $phone = $_REQUEST['phone'];
      $mobile = $_REQUEST['mobile'];
      $email = stripslashes($_REQUEST['email'];

$db = @mysql_connect('localhost', 'root', '#######');
mysql_select_db('address', $db);

$sql = "INSERT INTO address SET
   name=$name,
   phone=$phone,
   mobile=$mobile,
   email=addslashes($email)";
if ($sql) {
   echo "You addded your info to the database...well done";
} else { echo "it failed...moron."; }

?>


when i submit my form to this page all i get is "error 200" page. Why is this and what causes error 200?
Back to top View user's profile Send private message
MonkeyNation
-


Joined: 05 Feb 2005
Posts: 921
Location: Cardiff

PostPosted: Fri Jun 03, 2005 3:12 am    Post subject: Reply with quote

Unless putting a variable called sql causes a mysql query (I doubt it, and im not aware of it.) you'll need to put if(mysql_query($sql)), I believe.
_________________
Back to top View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger ICQ Number
Tim1681
-


Joined: 17 Jan 2005
Posts: 160
Location: Bristol, CT, USA

PostPosted: Fri Jun 03, 2005 3:24 am    Post subject: Reply with quote

Just wondering, what does the @ Symbol do in "@mysql_connect" or does it not belong there?
Back to top View user's profile Send private message AIM Address
k1ll3rdr4g0n
-


Joined: 04 Jul 2004
Posts: 609

PostPosted: Fri Jun 03, 2005 3:41 am    Post subject: Reply with quote

Tim1681 wrote:
Just wondering, what does the @ Symbol do in "@mysql_connect" or does it not belong there?


I don't think its 100% nessecarry, but I don't know its function.

As for the orignal post, well you have to acctually excute that SQL string. I have a bad memory, and I can't remember what the command was. Im going to get a huge piece of paper and write things like this on it.
_________________
Back to top View user's profile Send private message AIM Address
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Fri Jun 03, 2005 11:29 am    Post subject: Reply with quote

Tim1681 wrote:
Just wondering, what does the @ Symbol do in "@mysql_connect" or does it not belong there?

http://www.php.net/manual/en/language.operators.errorcontrol.php .
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
Tim1681
-


Joined: 17 Jan 2005
Posts: 160
Location: Bristol, CT, USA

PostPosted: Fri Jun 03, 2005 9:19 pm    Post subject: Reply with quote

Ah, thnx again aprelium lol. Never knew that =)
Back to top View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group