Hi,

I am working a form to pass information from it to mysql data. I am able to connect to the database. But nothing is being pass from the form to the php page. This is my php code...


---------------------form.html----------------------------------------------------



<html> <head> <title>Untitled</title> </style> </head> <body> <form name="form1" method="post" action="addlead.php"> <input name="title" type="text" size="40"> <input name="f_name" type="text" size="40"> <input name="l_name" type="text" size="40"> <input type="submit" name="Submit" value="Submit Information"> </form> </body> </html>

--------------------------addleads.php------------------------------------------
<?

include("./config.php");

$sql = "INSERT INTO $table_name
       (leads_id, title, f_name, l_name)
       VALUES
       ('$leads_id', \"$title\", \"$f_name\", \"$l_name\")";

//debug tool

print $sql;

$result = mysql_query($sql, $connection) or
   die ("Couldn't execute query.");

?>
<html>
<head>
   <title>Untitled</title>

</style>
</head>

<body>
<? echo $title ?>
<br>
<? echo $f_name ?>
<br>
<? echo $l_name>

-----------------------------------------------------------------------------------

What I am getting this....

INSERT INTO leads (leads_id, title, f_name, l_name) VALUES ('', "", "", "")

*Salutation*



*First Name*



*Last Name*


As you can see nothing is being pass...is there some other command beside the print $sql statement to see why nothing is being passed.


Thanks.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to