Jump to content

Darkside

Members
  • Posts

    21
  • Joined

  • Last visited

Darkside's Achievements

Newbie

Newbie (1/5)

2

Reputation

  1. Thanks Christian, I meant uploaded to server so that it could be submitted.
  2. Hmmmm? I was expecting it to be coming from the form? Clearly Im overlooking something.... <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>shorttest</title> </head> <?php include 'shorttest.php'; ?> <body> <form action="inserted.php" method="post" enctype="multipart/form-data" name="workfitnessform" id="workfitnessform"><H1> </H1> <h3> </h3> <table width="380" border="1"> <tr> <th colspan="3" scope="col"></th> </tr> <tr> <th colspan="3" scope="row"> </th> </tr> <tr> <th width="287" scope="row"><div align="left"> </div></th> <td colspan="2" rowspan="2"><h1 align="center">RIG</h1> <label for="textfield"></label> <input type="text" name="rig" id="col2" /></td> </tr> <tr> <th scope="row"><div align="left"> </div></th> </tr> <tr> <th scope="row"> </th> <td width="72"><div align="center"><strong>YES</strong></div></td> <td width="73"><div align="center"><strong>NO</strong></div></td> </tr> <tr> <th scope="row"><p align="left">Are you presently taking any medication of any kind?</p> </th> <td><input type="radio" name="medication" id="col3" /></td> <td><input type="radio" name="medication" id="col3" /></td> </tr> <tr> </tr> <tr> <th colspan="3" scope="row"> <input type="submit" name="submit" id="submit" /></th> </tr> </table> </form> </body> </html> PS. I know its messy, my excuse at this point is that I have just pulled 36 straight hrs of travel and work and Im just too shattered to tidy it up right now.
  3. Is the Array message telling me the form html is not right?
  4. OK I C the Array ( ) message is to do with print_r but Im not sure what its telling me?
  5. Not sure if this matters? $rig is textfield VARCHAR $medication is a Yes No radio button
  6. The connection message is from connect.php file.. should have left that bit out.
  7. Still no INSERT message but not error message you've got the connection to this database Array ( ) Ummmm?
  8. K... running that script gives error Parse error: syntax error, unexpected ')' in/home/hbcpl/public_html/australian.com/shorttest.php on line 34 Line 34 = $sql = "INSERT INTO tabletest (rig,medication) VALUES ('{$rig}','{$medication}')");
  9. Thanks Jessica and SC... unfortunately nothing seems to want to INSERT???? Very frustrating.
  10. Thanks again SC That fixed all the errors, but for some reason its still not INSERTING into DATABASE table
  11. oops forgot these are the errors im still getting. you've got the connection to this database Notice: Undefined index: medication in/home/hbcpl/public_html/australian.com/shorttest.php on line 30 Notice: Undefined variable: rig in/home/hbcpl/public_html/australian.com/shorttest.php on line 34
  12. My head hurts... :-\ made a couple of changes that I thought would suffice... but apparently Im still off target. Still getting errors but (cant see how or where im going wrong???) <?php error_reporting(E_ALL); ini_set('display_errors', '1'); if (isset($_POST['rig'], $_POST['medication'])) $rig = $_POST['rig']; $medication = $_POST['medication']; mysql_query("INSERT INTO tabletest (rig,medication) VALUES ('".$rig."','".$medication."')"); ?> Thought I had defined the index with the... if (isset($_POST['rig'], $_POST['medication'])) and thought the variables were already defined with $rig = $_POST['rig']; $medication = $_POST['medication']; My head hurts. Any suggestions greatly appreciated.
×
×
  • 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.