TechSpott - Computer and technology forums

Go Back   TechSpott - Computer and technology forums > Webmasters > Database Management > MySQL
MySQL Forum dedicated to the world's most popular open source database engine.

Reply
 
Thread Tools Display Modes
Old April 17th, 2010, 10:58 PM   #1 (permalink)
Juan
Guest
 
Posts: n/a
Default Registration with PHP and MySQL?

Okay, so I tried to make a registration system with PHP and MySQL like many other people do. But when I tested it out, it didn't work. This is my code:

<?php
$Name = $_POST['name'];
$Age = $_POST['age'];
$Email = $_POST['email'];

mysql_connect("HIDDEN","HIDDEN","HIDDEN") or die("Couldn't connect to SQL server.");
mysql_select_db("HIDDEN") or die("Couldn't connect to DB");
原帖地å€: TechSpott - Computer and technology forums http://www.techspott.com//showthread.php?p=8108

$query = "INSERT INTO HIDDEN (id, name, age, email)VALUES ('NULL','".$name."','".$age"','".$email"')";

mysql_query($query) or die("Error updating DB");

echo "DB updated!";
?>

I get the error at line 9, the part with the $query which is like:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /HIDDEN/HIDDEN/HIDDEN/update.php on line 9
Can anyone tell me what's going wrong here? I'd really like some help...
~Juan
  Reply With Quote Share with Facebook
Reply

Bookmarks

Tags
mysql, php, registration


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Update MySQL database through PHP form? selfrob MySQL 0 April 8th, 2010 01:07 PM
Question about php + mysql. What is a better approach? forsakenlegacy PHP 4 April 4th, 2010 03:30 AM
Sorting PHP MySQL table by links? christopher wood MySQL 1 April 4th, 2010 02:59 AM
Multiple PHP Scripts in 1 MySQL Database? Robert M PHP 0 April 4th, 2010 02:56 AM
where can i get video tutorial for php - mysql web site development for free? sole MySQL 0 April 4th, 2010 02:49 AM

 
Forum Stats
Members: 14,320
Threads: 20,327
Posts: 27,671
Total Online: 32

Newest Member: VanoNat

Latest Threads

Advertisements

Support our advertisers!

Amazon
Sears
Macys
1800flowers.com
Drugstore.com


Carbonite Online-Backups
Tiger Direct
Tech Depot
Buy.com
Office Depot
Fatcow
HostGator


TripsNow.us
Marriott
Expedia
CheapTickets.com
OneTravel
Hotwire

Are you a Fan?

Share this on Facebook

Tag Cloud

Partner Links


Contact Us - Home - Archive - Privacy Statement - Top - Copyright © 2009-2010, TechSpott - All times are GMT -4. Time is 05:21 AM

Powered by vBulletin® Copyright © Jelsoft Enterprises Ltd. :: SEO by vBSEO