curbsy Posted October 24, 2005 Share Posted October 24, 2005 regproc.php: (01) <?php(02) //Import(03) include ("dbhndl.php");(04)(05) //Make user(06) mysql_query(INSERT INTO "users" (07) ("u_id", (08) "u_name", (09) "u_pswd", (10) "u_ses_id") (11) VALUES ("null", (12) "$_POST['uname']", (13) "$_POST['pword']", (14) "null"));(15)(16) echo "<meta http-equiv='refresh' content=1;URL=index.php>";(17) ?> Error: Parse error: parse error, unexpected T_STRING in /home/users/curbsy/public_html/login/regproc.php on line 6 Link to comment Share on other sites More sharing options...
dcole.ath.cx Posted October 24, 2005 Share Posted October 24, 2005 mysql_query ( string query [, resource link_identifier] );you should at least have ); at the endadd " " or ' ' if it isn't a var. Link to comment Share on other sites More sharing options...
curbsy Posted October 25, 2005 Author Share Posted October 25, 2005 I did happen to get this fixed:<?php//Importinclude ("dbhndl.php");//Re-assign$name=$_POST['uname'];$pass=$_POST['pword'];$db="curbsy";$link = mysql_connect("localhost", "curbsy", "emerson");if (! $link)die("Couldn't connect to MySQL");mysql_select_db($db , $link)or die("Couldn't open $db: ".mysql_error());mysql_query ("INSERT INTO users (u_id, u_name, u_pswd, u_ses_id) VALUES (NULL, '$name', '$pass', NULL)");mysql_close($link);?> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now