Posted on: 04/22/05 10:19pm
By: jbpaul17
Posted on: 04/22/05 10:23pm
By: jbpaul17
Posted on: 04/23/05 02:10am
By: trinity
Posted on: 04/23/05 12:30pm
By: jbpaul17
Posted on: 04/23/05 09:36pm
By: jbpaul17
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>RSVP</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <? //initilize PHP if($_POST['submit']) //If submit is hit { //then connect as user //change user and password to your mySQL name and password //global $_TABLES; mysql_connect("localhost",USER_EDITED_OUT,PWD_EDITED_OUT); //select which database you want to edit mysql_select_db("DB_EDITED_OUT"); //convert all the posts to variables: $rsvp_id = $_POST['rsvp_id']; $accept = $_POST['accept']; $title = $_POST['title']; $name = $_POST['name']; $entree = $_POST['entree']; $title2 = $_POST['title2']; $name2 = $_POST['name2']; $entree2 = $_POST['entree2']; $title3 = $_POST['title3']; $name3 = $_POST['name3']; $entree3 = $_POST['entree3']; $title4 = $_POST['title4']; $name4 = $_POST['name4']; $entree4 = $_POST['entree4']; $title5 = $_POST['title5']; $name5 = $_POST['name5']; $entree5 = $_POST['entree5']; $shuttle = $_POST['shuttle']; $flight = $_POST['flight']; $transport = $_POST['transport']; $email = $_POST['email']; $comments = $_POST['comments']; //Insert the values into the correct database with the right fields //mysql table = gl_rsvp //table columns = rsvp_id, accept, title, name, entree, shuttle, flight, transport, email, comments //post variables = $rsvp_id, $accept, $title, $name, $entree, $shuttle, $flight, $transport, $email, $comments // if ($name != NULL) $result=MYSQL_QUERY("INSERT INTO gl_rsvp (rsvp_id,accept,title,name,entree,shuttle,flight,transport,email,comments)"."VALUES ('NULL', '$accept', '$title', '$name', '$entree', '$shuttle', '$flight', '$transport', '$email', '$comments')"); // if ($name2 != NULL) // $result= MYSQL_QUERY("INSERT INTO gl_rsvp (rsvp_id,accept,title,name,entree,shuttle,flight,transport,email,comments)"."VALUES ('NULL', '$accept', '$title2', '$name2', '$entree2', '$shuttle', '$flight', '$transport', '$email', '$comments')"); // if ($name3 != NULL) // $result=MYSQL_QUERY("INSERT INTO gl_rsvp (rsvp_id,accept,title,name,entree,shuttle,flight,transport,email,comments)"."VALUES ('NULL', '$accept', '$title3', '$name3', '$entree3', '$shuttle', '$flight', '$transport', '$email', '$comments')"); // if ($name4 != NULL) // $result=MYSQL_QUERY("INSERT INTO gl_rsvp (rsvp_id,accept,title,name,entree,shuttle,flight,transport,email,comments)"."VALUES ('NULL', '$accept', '$title4', '$name4', '$entree4', '$shuttle', '$flight', '$transport', '$email', '$comments')"); // if ($name5 != NULL) // $result=MYSQL_QUERY("INSERT INTO gl_rsvp (rsvp_id,accept,title,name,entree,shuttle,flight,transport,email,comments)"."VALUES ('NULL', '$accept', '$title5', '$name5', '$entree5', '$shuttle', '$flight', '$transport', '$email', '$comments')"); //confirm echo "Query Finished"; } else { // close php so we can put in our code --> <form method="post" action="http://www.jeffandcrystal.com/rsvp/rsvp4.php"> <table style="border-collapse: separate;" cellspacing="0" cellpadding="0" border="0" width="100%"> <tbody> <tr> <td width="253" colspan="2"> <input type="radio" value="Accept" name="accept">Accept with Pleasure</td> <td width="731" colspan="2"> <input type="radio" value="Decline" name="accept">Decline with Regret</td></tr> <tr> <td width="350" colspan="3"> <p> </p> </td> <td width="634"> <p> </p> </td></tr> <tr> <td width="350" colspan="3"> Names Of Those Attending In Your Party</td> <td width="634">Desired Entree</td></tr> <tr> <td width="350" colspan="3">1. <select size="1" name="title"> <option value="Mr." selected="selected">Mr.</option> <option value="Mrs.">Mrs.</option> <option value="Ms.">Ms.</option></select> <input type="text" size="35" value="" name="name"></td> <td width="634"><select size="1" name="entree"> <option value="Pork" selected="selected">Pork Loin</option> <option value="Beef">Roast Beef</option> <option value="Veggie">Vegetarian</option> <option value="Child">Children's Meal</option></select></td></tr> <tr> <td width="350" colspan="3">2. <select size="1" name="title2"> <option value="Mr." selected="selected">Mr.</option> <option value="Mrs.">Mrs.</option> <option value="Ms.">Ms.</option></select> <input type="text" size="35" value="" name="name2"></td> <td width="634"><select size="1" name="entree2"> <option value="Pork" selected="selected">Pork Loin</option> <option value="Beef">Roast Beef</option> <option value="Veggie">Vegetarian</option> <option value="Child">Children's Meal</option></select></td></tr> <tr> <td width="350" colspan="3">3. <select size="1" name="title3"> <option value="Mr." selected="selected">Mr.</option> <option value="Mrs.">Mrs.</option> <option value="Ms.">Ms.</option></select> <input type="text" size="35" value="" name="name3"></td> <td width="634"><select size="1" name="entree3"> <option value="Pork" selected="selected">Pork Loin</option> <option value="Beef">Roast Beef</option> <option value="Veggie">Vegetarian</option> <option value="Child">Children's Meal</option></select></td></tr> <tr> <td width="350" colspan="3">4. <select size="1" name="title4"> <option value="Mr." selected="selected">Mr.</option> <option value="Mrs.">Mrs.</option> <option value="Ms.">Ms.</option></select> <input type="text" size="35" value="" name="name4"></td> <td width="634"><select size="1" name="entree4"> <option value="Pork" selected="selected">Pork Loin</option> <option value="Beef">Roast Beef</option> <option value="Veggie">Vegetarian</option> <option value="Child">Children's Meal</option></select></td></tr> <tr> <td width="350" colspan="3">5. <select size="1" name="title5"> <option value="Mr." selected="selected">Mr.</option> <option value="Mrs.">Mrs.</option> <option value="Ms.">Ms.</option></select> <input type="text" size="35" value="" name="name5"></td> <td width="634"><select size="1" name="entree5"> <option value="Pork" selected="selected">Pork Loin</option> <option value="Beef">Roast Beef</option> <option value="Veggie">Vegetarian</option> <option value="Child">Children's Meal</option></select></td></tr> <tr> <td width="984" colspan="4"> <p> </p> </td></tr> <tr> <td width="984" colspan="4">Will you require shuttle service from the airport to The Clarion Hotel?</td></tr> <tr> <td width="89"> <input type="radio" value="Yes" name="shuttle">Yes</td> <td width="164"> <input type="radio" value="No" name="shuttle">No</td><td width="97"> <p> </p> </td><td width="634"> <p> </p> </td></tr> <tr> <td width="350" colspan="3"> <p> </p> </td> <td width="634"> <p> </p> </td> </tr> <tr> <td width="350" colspan="3">Flight Arrival Time: <input type="text" size="15" value="" name="flight"></td> <td width="634"> <p> </p> </td> </tr> <tr> <td width="984" colspan="4"> <p> </p> </td></tr> <tr> <td width="984" colspan="4">Will you require transportation from The Clarion Hotel to the Ceremony and back?</td></tr> <tr> <td width="89"> <input type="radio" value="Yes" name="transport">Yes</td> <td width="164"> <input type="radio" value="No" name="transport">No</td><td width="97"> <p> </p> </td><td width="634"> <p> </p> </td></tr> <tr> <td width="984" colspan="4"> <p> </p> </td></tr> <tr> <td width="984" colspan="4">Email Address (optional): <input type="text" size="30" value="" name="email"></td></tr> <tr> <td width="350" colspan="3"> <p> </p> </td> <td width="634"> <p> </p> </td> </tr> <tr> <td width="350" colspan="3">Comments/Questions (optional):</td> <td width="634"> <p> </p> </td> </tr> <tr> <td width="984" colspan="4"><textarea name="comments" rows="5" cols="60"> </textarea></td></tr> <tr> <td width="89"> <p> </p> </td> <td width="164"> <p> </p> </td> <td width="97"> <p> </p> </td> <td width="634"> <p> </p> </td> </tr><tr> <td width="89"> <input type="submit" value="submit" name="submit"></td> <td width="164"> <p> </p> </td> <td width="97"> <p> </p> </td> <td width="634"> <p> </p> </td> </tr></tbody></table></form><!--} //close the else statement --> </body> </html>
Posted on: 04/24/05 01:33pm
By: jbpaul17
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>RSVP</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <SCRIPT LANGUAGE="Javascript"> function validate() { if (!(rsvpform.accept[0].checked || rsvpform.accept[1].checked)) { alert('Please select either Accept or Decline, thanks!'); event.returnValue=false; } else { rNv=rsvpform.name.value; if (rNv=='') { alert('Please enter your name so we can properly track responses, thanks!'); event.returnValue=false; } } } </SCRIPT> <? //initilize PHP //$_TABLES['gl_rsvp'] = $_DB_table_prefix . 'gl_rsvp'; if($_POST['submit']) //If submit is hit { //then connect as user //change user and password to your mySQL name and password //global $_TABLES; //mysql_connect("localhost","user","password"); //mysql_connect("localhost",USER_EDITED_OUT,PWD_EDITED_OUT); //select which database you want to edit mysql_select_db("DB_EDITED_OUT"); //convert all the posts to variables: $rsvp_id = $_POST['rsvp_id']; $accept = $_POST['accept']; $title = $_POST['title']; $name = $_POST['name']; $entree = $_POST['entree']; $title2 = $_POST['title2']; $name2 = $_POST['name2']; $entree2 = $_POST['entree2']; $shuttle = $_POST['shuttle']; $flight = $_POST['flight']; $transport = $_POST['transport']; $email = $_POST['email']; $comments = $_POST['comments']; //Insert the values into the correct database with the right fields //mysql table = gl_rsvp //table columns = rsvp_id, accept, title, name, entree, shuttle, flight, transport, email, comments //post variables = $rsvp_id, $accept, $title, $name, $entree, $shuttle, $flight, $transport, $email, $comments $result=MYSQL_QUERY("INSERT INTO gl_rsvp (rsvp_id,accept,title,name,entree,shuttle,flight,transport,email,comments)"."VALUES ('NULL', '$accept', '$title', '$name', '$entree', '$shuttle', '$flight', '$transport', '$email', '$comments')"); if ($name2 != NULL) { $result2=MYSQL_QUERY("INSERT INTO gl_rsvp (rsvp_id,accept,title,name,entree,shuttle,flight,transport,email,comments)"."VALUES ('NULL', '$accept', '$title2', '$name2', '$entree2', '$shuttle', '$flight', '$transport', '$email', '$comments')"); } if ($name3 != NULL) { $result3=MYSQL_QUERY("INSERT INTO gl_rsvp (rsvp_id,accept,title,name,entree,shuttle,flight,transport,email,comments)"."VALUES ('NULL', '$accept', '$title3', '$name3', '$entree3', '$shuttle', '$flight', '$transport', '$email', '$comments')"); } if ($name4 != NULL) { $result4=MYSQL_QUERY("INSERT INTO gl_rsvp (rsvp_id,accept,title,name,entree,shuttle,flight,transport,email,comments)"."VALUES ('NULL', '$accept', '$title4', '$name4', '$entree4', '$shuttle', '$flight', '$transport', '$email', '$comments')"); } if ($name5 != NULL) { $result5=MYSQL_QUERY("INSERT INTO gl_rsvp (rsvp_id,accept,title,name,entree,shuttle,flight,transport,email,comments)"."VALUES ('NULL', '$accept', '$title5', '$name5', '$entree5', '$shuttle', '$flight', '$transport', '$email', '$comments')"); } //confirm echo $name; echo ", thank you for responding to our RSVP."; if ($accept == 'Accept') echo " We cannot wait to see you there!"; else echo " Sorry you couldn't join us."; } else{ // close php so we can put in our code ?> <form name="rsvpform" method="post" onsubmit="validate();" action="http://www.jeffandcrystal.com/rsvp/rsvp4.php"> <table style="border-collapse: separate;" cellspacing="0" cellpadding="0" border="0" width="100%"> <tbody> <tr> <td width="253" colspan="2"> <input type="radio" value="Accept" name="accept">Accept with Pleasure</td> <td width="731" colspan="2"> <input type="radio" value="Decline" name="accept">Decline with Regret</td></tr> <tr> <td width="350" colspan="3"> <p> </p> </td> <td width="634"> <p> </p> </td></tr> <tr> <td width="350" colspan="3"> Names Of Those Attending In Your Party</td> <td width="634">Desired Entree</td></tr> <tr> <td width="350" colspan="3">1. <select size="1" name="title"> <option value="Mr." selected="selected">Mr.</option> <option value="Mrs.">Mrs.</option> <option value="Ms.">Ms.</option></select> <input type="text" size="35" value="" name="name"></td> <td width="634"><select size="1" name="entree"> <option value="Pork" selected="selected">Pork Loin</option> <option value="Beef">Roast Beef</option> <option value="Veggie">Vegetarian</option> <option value="Child">Children's Meal</option></select></td></tr> <tr> <td width="350" colspan="3">2. <select size="1" name="title2"> <option value="Mr." selected="selected">Mr.</option> <option value="Mrs.">Mrs.</option> <option value="Ms.">Ms.</option></select> <input type="text" size="35" value="" name="name2"></td> <td width="634"><select size="1" name="entree2"> <option value="Pork" selected="selected">Pork Loin</option> <option value="Beef">Roast Beef</option> <option value="Veggie">Vegetarian</option> <option value="Child">Children's Meal</option></select></td></tr> <tr> <td width="350" colspan="3">3. <select size="1" name="title3"> <option value="Mr." selected="selected">Mr.</option> <option value="Mrs.">Mrs.</option> <option value="Ms.">Ms.</option></select> <input type="text" size="35" value="" name="name3"></td> <td width="634"><select size="1" name="entree3"> <option value="Pork" selected="selected">Pork Loin</option> <option value="Beef">Roast Beef</option> <option value="Veggie">Vegetarian</option> <option value="Child">Children's Meal</option></select></td></tr> <tr> <td width="350" colspan="3">4. <select size="1" name="title4"> <option value="Mr." selected="selected">Mr.</option> <option value="Mrs.">Mrs.</option> <option value="Ms.">Ms.</option></select> <input type="text" size="35" value="" name="name4"></td> <td width="634"><select size="1" name="entree4"> <option value="Pork" selected="selected">Pork Loin</option> <option value="Beef">Roast Beef</option> <option value="Veggie">Vegetarian</option> <option value="Child">Children's Meal</option></select></td></tr> <tr> <td width="350" colspan="3">5. <select size="1" name="title5"> <option value="Mr." selected="selected">Mr.</option> <option value="Mrs.">Mrs.</option> <option value="Ms.">Ms.</option></select> <input type="text" size="35" value="" name="name5"></td> <td width="634"><select size="1" name="entree5"> <option value="Pork" selected="selected">Pork Loin</option> <option value="Beef">Roast Beef</option> <option value="Veggie">Vegetarian</option> <option value="Child">Children's Meal</option></select></td></tr> <tr> <td width="984" colspan="4"> <p> </p> </td></tr> <tr> <td width="984" colspan="4">Will you require shuttle service from the airport to The Clarion Hotel?</td></tr> <tr> <td width="89"> <input type="radio" value="Yes" name="shuttle">Yes</td> <td width="164"> <input type="radio" value="No" name="shuttle">No</td><td width="97"> <p> </p> </td><td width="634"> <p> </p> </td></tr> <tr> <td width="350" colspan="3"> <p> </p> </td> <td width="634"> <p> </p> </td> </tr> <tr> <td width="350" colspan="3">Flight Arrival Time: <input type="text" size="15" value="" name="flight"></td> <td width="634"> <p> </p> </td> </tr> <tr> <td width="984" colspan="4"> <p> </p> </td></tr> <tr> <td width="984" colspan="4">Will you require transportation from The Clarion Hotel to the Ceremony and back?</td></tr> <tr> <td width="89"> <input type="radio" value="Yes" name="transport">Yes</td> <td width="164"> <input type="radio" value="No" name="transport">No</td><td width="97"> <p> </p> </td><td width="634"> <p> </p> </td></tr> <tr> <td width="984" colspan="4"> <p> </p> </td></tr> <tr> <td width="984" colspan="4">Email Address (optional): <input type="text" size="30" value="" name="email"></td></tr> <tr> <td width="350" colspan="3"> <p> </p> </td> <td width="634"> <p> </p> </td> </tr> <tr> <td width="350" colspan="3">Comments/Questions (optional):</td> <td width="634"> <p> </p> </td> </tr> <tr> <td width="984" colspan="4"><textarea name="comments" rows="5" cols="60"> </textarea></td></tr> <tr> <td width="89"> <p> </p> </td> <td width="164"> <p> </p> </td> <td width="97"> <p> </p> </td> <td width="634"> <p> </p> </td> </tr><tr> <td width="89"> <input type="submit" value="submit" name="submit"></td> <td width="164"> <p> </p> </td> <td width="97"> <p> </p> </td> <td width="634"> <p> </p> </td> </tr></tbody></table></form> <? } //close the else statement ?> </body> </html>
<TABLE> <TR> <TD>Accept</TD> <TD>Title</TD> <TD>Name</TD> <TD>Entree</TD> <TD>Shuttle</TD> <TD>Flight</TD> <TD>Transport</TD> <TD>Email</TD> <TD>Comments</TD> </TR> <? //connect as user //global $_TABLES; mysql_connect("localhost",USER_EDITED_OUT,PWD_EDITED_OUT); //select which database you want to display from mysql_select_db("DB_EDITED_OUT"); //Insert the values into the correct database with the right fields //mysql table = gl_rsvp //table columns = rsvp_id, accept, title, name, entree, shuttle, flight, transport, email, comments //post variables = $rsvp_id, $accept, $title, $name, $entree, $shuttle, $flight, $transport, $email, $comments // $result=MYSQL_QUERY("INSERT INTO gl_rsvp (rsvp_id,accept,title,name,entree,shuttle,flight,transport,email,comments)"."VALUES ('NULL', '$accept', '$title', '$name', '$entree', '$shuttle', '$flight', '$transport', '$email', '$comments')"); $result = MYSQL_QUERY("SELECT accept, title, name, entree, shuttle, flight, transport, email, comments FROM {$_TABLES['gl_rsvp']}"); while ($A = DB_fetchArray($result)){ $retval .= '<p>' . $A['accept'] . '</p>'; } return $retval; ?> </TABLE>