I have a data input form which collects information from users, and then
transmits to a page for user to view. How do I pass the input date into
the table. Have tried the following:

   <form name='frmAttyApp' method=post action="app.php3">

        Please enter your last name (<i>required</i>):
        <input name="last_name" type="text">

This then displays to user through app.php3:
echo (
 "<b>Thank You for submitting the following:</b><br>Please double check
your answers.<br>Please click back and fix any errors prior to
submitting." . NL . NL . // new line constant.
 "Last Name: $last_name" . NL

<form  method=post action="attydb.phtml">

This then hits the attdb.phtml and phtml does connect to the database as

       mysql_connect(localhost, test);
           @mysql_select_db(trial) or die("Unable to select database");
                $query="INSERT INTO table values('$last_name)";


>From my logs, I am connecting fine to the database. But the information
in the last_name is not being passed to the database. The app.php3
displays only as follows when brought into the browser:

Last Name: Bragg<br>

How do I retain the $last_name information so it passes to the database
and at the same time displays in the browser so user can be sure entry
is correct? Or, how do i pass the input to the database in the first


PHP Database Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to