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.

PHP Forum


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



Freelance Jobs

Reply
Update database entry
Old 09-03-2008, 07:12 AM Update database entry
Skilled Talker

Posts: 60
Trades: 0
I want somebody to be able to enter their email address and a random number. That works fine, but I want them to have the option to update that number if they want. I've get the method of the form to get and have tried this:
PHP Code:
$number strval($_GET['number']);
$email strval($_GET['email']);

$con mysql_connect("hostname/server IP","username","password");
if (!
$con)
  {
  die(
'Could not connect: ' mysql_error());
  }

mysql_select_db("database"$con);
mysql_query("UPDATE table SET number = '$number' WHERE email = '$email'");
mysql_close($con); 
but I just wanted to check if it'll work?
Thanks in advance
thehappyappy is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-03-2008, 08:55 AM Re: Update database entry
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
I don't see no reason for it to fail...
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 09-03-2008, 09:08 AM Re: Update database entry
Skilled Talker

Posts: 60
Trades: 0
Thanks, I just wanted some reassurance
thehappyappy is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Update database entry
 

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.11842 seconds with 12 queries