[PHP3] Proof read this script please... From: Chris Toth (toth.22 <email protected>)
Date: 04/30/00

Hopefully this code will work, but I'm not sure, so could you folks please
check it over?

Thanks!

/*This code inserts the HTML form data into the MySQL database*/

<?php

/*Connect to DB server, select DB*/

mysql_connect (localhost, username, password);

mysql_select_db (management);

/* Make sure they filled everything out */

                 if (($man_fname=="") || ($man_lname=="") ||
($man_cmyband=="") || ($man_addrone=="") || ($man_city=="") ||
($man_state=="") || ($man_zip=="") || ($man_email==""));
                         echo "<center><h2>** Error **</h2></center>";
                         echo "<br><br>";
                         echo "Oops, it looks like you forgot to fill out
one of the fields in the form. Please go back to the <a
href=\"http://www.thestratosphere.com/Management%20Registration.html\">The
Stratosphere</a> and fill out all fields, then resubmit the form. If a
field is not applicable to you, you can enter none in that field.";
                         echo "</body></html>";
                         exit;
                 endif;

  /*Let the user proofread his/her entries*/

                 echo "This is what you are sending, is everything correct?";
                         echo "<center><table border=1><tr><td>";
                         echo "First name: $man_fname<br>";
                         echo "Last name: $man_lname<br>";
                         echo "Title: $man_fname<br>";
                         echo "Company/Band: $man_fname<br>";
                         echo "Address 1: $man_fname<br>";
                         echo "Address 2: $man_fname<br>";
                         echo "City: $man_fname<br>";
                         echo "State: $man_fname<br>";
                         echo "Zip: $man_fname<br>";
                         echo "Tel: $man_fname<br>";
                         echo "Tel: $man_fname<br>";
                         echo "E-mail: $man_fname<br>";
                         echo "Membership Status: $man_fname<br>";
                         echo "Membership Level: $man_fname<br>";
                         echo "Form of Payment: $man_fname<br>";
                         echo "Category: $man_fname<br>";
                         echo "Main Instument: $man_fname<br>";
                         echo "Other Instruments: $man_fname<br>";
                         echo "Describe Style: $man_fname<br>";
                         echo "I am a member of this or these unions/
organizations: $man_fname<br>";
                         echo "List your credits here: $man_fname<br>";
                         echo "Everything look ok? If not go back and make
the corrections.<br>";
                         echo "</td></tr></table></center>";

/*Everything looks good? Great submit it!*/

                         echo "<center>";
                         echo "<form action=\"$PHP_SELF\" method=\"POST\">";
                         echo "<input type=\"submit\" value=\" Looks Good,
submit! \">";
                         echo "</center>";
                         echo "</form>";

/*This part looks complicated, but it's just a bunch of names and values,
check for spelling errors! */

mysql_query ("INSERT INTO management(first_name, last_name, title, company,
address1, address2, city, state, zip, tel1, tel2, email, member_status,
member_level, payment_form, cc_number, expire_date, sig,
category,primary_instrument, secondary_instrument, music_style,
organizations, credits)
                 VALUES ('$man_fname', '$man_lname', '$man_title',
'$man_cmyband', '$man_addrone', '$man_addrtwo',
'$man_city','$man_state','$man_zip','$man_tel','$man_teltwo','$man_email','$
man_memstatus','$man_memlevel','$man_payform','$man_ccnum','$man_expdate','$
man_sig','$man_cat','$man_priinstr','$man_secinstr','$man_style','$man_org',
'$man_credits') ");

/*Thank the user for the submission*/

print ($first_name);

print (" ");

print ($last_name);

print ("<p>");

print ("Thank you for the submission.");

?>

-- 
PHP 3 Mailing List <http://www.php.net/>
To unsubscribe, send an empty message to php3-unsubscribe <email protected>
To subscribe to the digest, e-mail: php3-digest-subscribe <email protected>
To search the mailing list archive, go to: http://www.php.net/mailsearch.php3
To contact the list administrators, e-mail: php-list-admin <email protected>