pro

From: Date: Sun, 01 Feb 2009 18:20:02 +0000
Subject: pro
Groups: php.qa 
Request: Send a blank email to php-qa+get-64620@lists.php.net to get a copy of this message
What is wrong with this code? Registration Page
     <form action="process.php" method="post"  >
     <p class="style8 phy style9">Please enter the following information to begin the registration process: </p>
       <table width="539" border="0">
         <tr>
           <td width="305" class="style9 style8 phy"><strong> First Name </strong></td>
           <td width="224" class="phy"><input type="text" name="x_fname" /></td>
         </tr>
         <tr>
           <td class="style9 style8 phy"><strong> Last Name </strong></td>
           <td class="phy"><input type="text" name="x_lname" /></td>
         </tr>
         <tr>
         <td class="style9 style8 phy"><strong>Practice or Company Name </strong></td>
         <td class="phy"><input type="text" name="x_practice" /></td>
         </tr>
         <tr>
           <td class="style9 style8 phy"><strong>Street Address</strong></td>
           <td class="phy"><input type="text" name="x_staddress" /></td>
         </tr>
         <tr>
           <td class="style9 style8 phy"><strong>City </strong></td>
           <td class="phy"><input type="text" name="x_city" /></td>
         </tr>
         <tr>
           <td class="style9 style8 phy"><strong>State </strong></td>
           <td class="phy"><input type="text" name="x_state" /></td>
         </tr>
         <tr>
           <td class="style9 style8 phy"><strong>ZIP Code </strong></td>
           <td class="phy"><input type="text" name="x_zip" /></td>
         </tr>
         <tr>
           <td class="style9 style8 phy"><strong>Telephone </strong></td>
           <td class="phy"><input type="text" name="x_tele" /></td>
         </tr>
         <tr>
           <td class="style9 style8 phy"><strong>Email </strong></td>
           <td class="phy"><input type="text" name="x_email" /></td>
         </tr>
         <tr>
           <td class="style9 style8 phy"><strong>Method of Payment </strong></td>
           <td class="phy"><input type="text" name="x_zip" /></td>
         </tr>
                    <tr>
            <td height="16" class="phy style8 style9"><strong> Meeting or Event  </strong></td>
            <td class="phy"><p>&nbsp;
            </p>            </td>
          </tr>
         <tr>
           <td height="16" class="phy style8 style9"><p>Arthritis Public Forum<br>
             Bone &amp; Bogey's Golf Tournament<br>
           Colorado Orthopaedic Trauma Symposium <br>
               Coloradp Spine Symposium<br> Colorado Sports Medicine Symposium<br>Nurse Case Manager Luncheon<br>
           Rocky Mountain Shoulder &amp; Elbow Society<br> Spring Orthopaedic Day<br>Walk for Joint Health </p>
           </td>
           <td class="phy" valign="top"><input type="text" name="x_nevent" /></td>
         </tr>
         <tr>
           <td class="style9 style8 phy"><strong>Questions or Comments </strong></td>
           <td class="phy"><input type="text" name="x_qanda" /></td>
         </tr>
       </table>
        </span><label>
       <input type="submit" name="Submit" value="Submit" />
       </label>
       </p>               </form>
       <p class="style5"><span class="style9">Shirley Brodjeski at Panorama is the main contact and she can be reached  by email <a href="mailto:sbrodjeski@panoramaortho.com">click here</a> or call (720) 497-6676.</span></p>
</td> </tr> <tr> <td></td> </tr> <tr> <td height="433" valign="top"> <p align="left"><font color="#660099" face="Arial, Helvetica, sans-serif">
     <p><strong align="left"><font color="#660099" face="Arial, Helvetica, sans-serif"><a href="calendarofevents.html">Calendar
       of Events</a></font></strong></p>
     <ul>
            </ul>
</td> </tr> <tr> <td height="433" valign="top">&nbsp; </td> <td valign="top">&nbsp;</td> </tr> </table> </body> </script> Process Page <html> <head> <title>Register Online - Panorama Foundation</title> <!-- ..style8 { font-family: Tahoma; font-size: 12px; } --> </head> <script src="../scripts/AC_RunActiveContent.js" type="text/javascript"></script> <body> </div></td> </tr> </table> </td> </tr> </table> <table width="799" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="177" valign="top" bgcolor="#FFFFFF" align="center"> </tr>
</table>    </td>
<td width="50">&nbsp;</td> <td width="423" valign="top"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td>&nbsp;</td> </tr> <tr> <td><font color="#cc9900" size="6" face="Garamond"><strong>Online Registration</strong></font></td> </tr> <tr> <td><td width="566" valign="top"> <span class= "style8"> Please review the following information and verify it's correct <br /> <?PHP $x_fname = $HTTP_POST_VARS['x_fname']; if ($x_fname == "") die('Please go back and enter in your first name.'); $x_lname = $HTTP_POST_VARS['x_lname']; if ($x_lname == "") die('Please go back and enter in your last name.'); $x_practice = $HTTP_POST_VARS['x_practice']; if ($x_practice == "") die('Please go back and enter the name of the practice or company you are a part of at this time. If none, please type in n/a.'); $x_staddress = $HTTP_POST_VARS['x_staddress']; if ($x_staddress == "") die('Please go back and enter in the street address or a PO Box.'); $x_city = $HTTP_POST_VARS['x_city']; if ($x_city == "") die('Please go back and enter in a city.'); $x_zip = $HTTP_POST_VARS['x_zip']; if ($x_zip == "") die ($x_zip = 'Please enter in your ZIP Code.'); $x_nevent = $HTTP_POST_VARS['x_nevent']; if ($x_nevent == "") die('Please go back and type in the name of the event you plan to attend.'); $x_payment = $HTTP_POST_VARS['x_payment']; if ($x_payment == "") die('Please go back and enter in the method of payment you plan to use for this event. If you plan to pay at the event, please enter you pay at event. If the event is not charging a fee, enter n/a'); $x_tele = $HTTP_POST_VARS['x_tele']; if ($x_tele == "") die('No telephone number entered, please go back and enter in your telephone number.'); $x_email = $HTTP_POST_VARS['x_email']; if ($x_email == "") die('No email address entered, please go back and enter in your email address.'); $x_Message = ".$x_fname." ".$x_lname." ".$_practice." just registered for ".$x_nevent."Method of payment ".$x_payment." Email address is".$x_email." Telephone number".$x_tele. "Question is ".$x_qanda."; /* First of all we define the variables which are the message, the from address, the to address and the subject along with the headers which are used to show who sent the email. */ $message = $x_Message; $from = $x_email; $to = "chris@ives.bz"; $subject = "Panorama Registration"; $headers = "From: $from"; /* Now we are ready to send the email so we call php's mail() function with the appropriate variables from above included in the brackets */ mail($to,$subject,$message,$headers); //$x_Description = $HTTP_GET_VARS['x_Description']; $x_Description = "Panorama Registration"; ?> <?php
$dbhost     = 'localhost';
$dbuser     = '   ';
$dbpassword = '    ';
$dbname     = '    ';
function db_connect() {global $dbhost, $dbuser, $dbpassword, $dbname; $conn = mysql_connect($dbhost, $dbuser, $dbpassword); if (!$conn) {
       echo mysql_error();    }
mysql_select_db($dbname) or die (mysql_error()); return $conn;} //connect to the db db_connect(); $query = "INSERT INTO people VALUES ('Null' '$x_fname', '$x_lname, '$x_practice', '$x_staddress', '$x_city', '$x_state', '$x_zip', '$x_nevent', '$x_qanda', '$x_payment', '$x_tele_good', '$x_email' )"; mysql_query($query); ?>
     First Name:
     <?=$x_fname?>
     <br>
     Last Name:
     <?=$x_lname?>      <br>
     Practice or Company Name:
     <?=$x_practice?>
     <br />
     Street Address:
     <?=$x_staddress?>
     <br />
     City:
     <?=$x_city?>
     <br />
     State:
     <?=$x_state?>
     <br />
     ZIP:
     <?=$x_zip?>
     <br>
     Name of Event:
     <?=$x_nevent?>      <br>
     Questions or Comments :
     <?=$x_qanda?>
     <br />
     Method of Payment:
     <?=$x_payment?>
     <br />
     Telephone:
     <?=$x_tele?>
     <br />
     Email Address:
     <?=$x_email?>
     <br />
?>

« previous php.qa (#64620) next »