Jump to content

mallika

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

mallika's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, Thanks for replying. the following is mysql code,please let me know where to insert your code. Thanks a lot , Mallika. [code]<? include "db.php"; $lname = $_POST['lname']; $fname = $_POST['fname']; $cmpaff = $_POST['cmpaff']; $title = $_POST['title']; $street = $_POST['street']; $city = $_POST['city']; $zip = $_POST['zip']; $ophc = $_POST['ophc']; $oph = $_POST['oph']; $hphc = $_POST['hphc']; $hph = $_POST['hph']; $faxc = $_POST['faxc']; $fax = $_POST['fax']; $email = $_POST['email']; $degree = $_POST['degree']; $ya = $_POST['ya']; $disc = $_POST['disc']; $sefhdisc = $_POST['sefhdisc']; $yj = $_POST['yj']; $jpip1 = $_POST['jpip1']; $jpip2 = $_POST['jpip2']; $jpip3 = $_POST['jpip3']; $jpip4 = $_POST['jpip4']; $jpip5 = $_POST['jpip5']; $jpip6 = $_POST['jpip6']; $jpip7 = $_POST['jpip7']; $jpip8 = $_POST['jpip8']; $jpip9 = $_POST['jpip9']; $jpip10 = $_POST['jpip10']; $jpip11 = $_POST['jpip11']; $jpip12 = $_POST['jpip12']; $jptp1 = $_POST['jptp1']; $jptp2 = $_POST['jptp2']; $jptp3 = $_POST['jptp3']; $jptp4 = $_POST['jptp4']; if ($_POST['phase1']) { $phase1 = "on"; } else {   $phase1 = "off"; } if ($_POST['phase2']) { $phase2 = "on"; } else {   $phase2 = "off"; } if ($_POST['intd']) { $intd = "on"; } else {   $intd = "off"; }     $Query = "INSERT INTO form1 VALUES ('0', '$lname', '$fname', '$cmpaff', '$title', '$street', '$city', '$zip', '$ophc', '$oph', '$hphc', '$hph', '$faxc', '$fax', '$email', '$degree', '$ya', '$disc', '$sefhdisc', '$yj', '$phase1', '$phase2', $jpip1, $jpip2, $jpip3, $jpip4, $jpip5, $jpip6, $jpip7, $jpip8, $jpip9, $jpip10, $jpip11, $jpip1, $jptp1, $jptp2, $jptp3, $jptp4, '$intd')"; $Result = mysql_db_query ($DBName, $Query); mysql_close  ($Link); if ($Result) {   print "Data saved correctly"; } else {   print "Error Reported on pform1.php<br>"; print "SQL: <b>$Query</b><br>"; print "$DBName, $Link, $Host<br>"; } ?>[/code]
  2. Hi, I am new with php-mysql.I have a form that can be seen here: [url=http://hunstem.uhd.edu/savephp/form1.html]http://hunstem.uhd.edu/savephp/form1.html[/url] On this form in the very last section in the judging references i wanted to allow user to enter a number from 1 to 10 only but it allows any number .If anyone one knows how to write code to acheive this please help me. Thanks, Mallika.
  3. Hi, Thank you for replying . Just one thing, where exactly to add this code and do i have to write it for all the jip1 to 11 or just once, Please let me know. Thanks, Mallika
  4. Hi, I am really new to mysql, i am having a problem with a code.I have a form that can be seen here: [url=http://hunstem.uhd.edu/savephp/form1.html]http://hunstem.uhd.edu/savephp/form1.html[/url] In the last section where it says Judging references, it does not allow me to save without filling all the cells.I need to save without entering some or all cells.Please help me. Thanks, Mallika. The code for the script to save is here: [code]<? include "db.php"; $lname = $_POST['lname']; $fname = $_POST['fname']; $cmpaff = $_POST['cmpaff']; $title = $_POST['title']; $street = $_POST['street']; $city = $_POST['city']; $zip = $_POST['zip']; $ophc = $_POST['ophc']; $oph = $_POST['oph']; $hphc = $_POST['hphc']; $hph = $_POST['hph']; $faxc = $_POST['faxc']; $fax = $_POST['fax']; $email = $_POST['email']; $degree = $_POST['degree']; $ya = $_POST['ya']; $disc = $_POST['disc']; $sefhdisc = $_POST['sefhdisc']; $yj = $_POST['yj']; $jpip1 = $_POST['jpip1']; $jpip2 = $_POST['jpip2']; $jpip3 = $_POST['jpip3']; $jpip4 = $_POST['jpip4']; $jpip5 = $_POST['jpip5']; $jpip6 = $_POST['jpip6']; $jpip7 = $_POST['jpip7']; $jpip8 = $_POST['jpip8']; $jpip9 = $_POST['jpip9']; $jpip10 = $_POST['jpip10']; $jpip11 = $_POST['jpip11']; $jpip12 = $_POST['jpip12']; $jptp1 = $_POST['jptp1']; $jptp2 = $_POST['jptp2']; $jptp3 = $_POST['jptp3']; $jptp4 = $_POST['jptp4']; if ($_POST['phase1']) { $phase1 = "on"; } else {   $phase1 = "off"; } if ($_POST['phase2']) { $phase2 = "on"; } else {   $phase2 = "off"; } if ($_POST['intd']) { $intd = "on"; } else {   $intd = "off"; }     $Query = "INSERT INTO form1 VALUES ('0', '$lname', '$fname', '$cmpaff', '$title', '$street', '$city', '$zip', '$ophc', '$oph', '$hphc', '$hph', '$faxc', '$fax', '$email', '$degree', '$ya', '$disc', '$sefhdisc', '$yj', '$phase1', '$phase2', $jpip1, $jpip2, $jpip3, $jpip4, $jpip5, $jpip6, $jpip7, $jpip8, $jpip9, $jpip10, $jpip11, $jpip1, $jptp1, $jptp2, $jptp3, $jptp4, '$intd')"; $Result = mysql_db_query ($DBName, $Query); mysql_close  ($Link); if ($Result) {   print "Data saved correctly"; } else {   print "Error Reported on pform1.php<br>"; print "SQL: <b>$Query</b><br>"; print "$DBName, $Link, $Host<br>"; } ?>[/code]
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.