Forum Moderators: coopster

Message Too Old, No Replies

form handling problems

need mysql help too

         

phpchancellor

2:13 am on Jul 20, 2005 (gmt 0)

10+ Year Member



i am try to write a little php for a form. Essentially i want the form to be processed by the form handler and for the variables to be entered into my mysql database. here is the form:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<title>Sign up validation</title>
</head>
<body>
<?php
$email=($_POST['email'])

$dbh = mysql_connect('localhost', 'something_this', 'thewoman');

mysql_select_db ("something_info") or die ('unable to connect to the database');

$query="INSERT INTO identity(id, email, phone, self)

VALUES ('','$email', '$phone', '$info')";

$result= mysql_query($query);

echo 'Thank You for joining and submitting your info'

?>
</body>
</html>

now the error message i recieve is:

Parse error: parse error, unexpected T_VARIABLE in /home/something/public_html/signup.php on line 11.

Line 11 is the mysql_connect line along with all the username, and password variables.

Any suggestions?

jaski

4:37 am on Jul 20, 2005 (gmt 0)

10+ Year Member



> $email=($_POST['email'])

should be
$email=($_POST['email']);

but doing that will give you parse error atleast one more time .. which you can correct by adding semicolon to this line

echo 'Thank You for joining and submitting your info'

all the best ;)

phpchancellor

12:47 pm on Jul 20, 2005 (gmt 0)

10+ Year Member



Thanks for the help. Problem solved, it was just the semi-colons.