Greetings and Help With Forms

From: Date: Fri, 09 Jun 2000 19:27:17 +0000
Subject: Greetings and Help With Forms
Groups: php.general 
Request: Send a blank email to php-general+get-1412@lists.php.net to get a copy of this message
Greetings all, My Name is Phillip. I am new to programming and PHP. I just started late last week to learn both of these web development tools. I am dropping a note as I am creating a form in PHP to handle data and load it into a MySQL DB. The question I have is what parameters do I use to pass the user to a specific page after they enter information into form. The code I am basing this off of is from the webmonkey tutorial. <?php if ($submit) { //Process the form $db = mysql_connect("localhost", "root"); mysql_select_db("test",$db); $sql = "insert into employees (first,last,address,position) values ('$first','$last','$address','$position')"; $result = mysql_query($sql); echo "Thank you! Information entered.\n"; } else { //Display the form to fill out ?> <FORM ACTION="<?php echo $PHP_SELF?>" METHOD="post"> First Name: <INPUT TYPE="text" NAME="first" SIZE="20"><BR> Last Name: <INPUT TYPE="text" NAME="last" SIZE="20"><BR> Address: <INPUT TYPE="text" NAME="address" SIZE="20"></TEXTAREA><BR> Position: <INPUT TYPE="text" NAME="position" SIZE="20"><BR> <INPUT TYPE="submit" NAME="submit" VALUE="Enter Information"> </FORM> <?php //Close the if statment } ?> So basically instead of the echo statement when someone submits the form. I would like to take them to another URL. How would I specify that? Thanks Phillip -- Phillip S. Baker phillip@wordsandimages.com Words & Images, Inc. 1535 Seabright Avenue, Suite 100, Santa Cruz, CA 95062 Direct Line (831) 420-2641 / Fax (831) 458-0808

« previous php.general (#1412) next »