Jump to content

PhdJB

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

PhdJB's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. huh..thats amazing, who would think that something so simple could solve a headache!!! Thanks man!!
  2. Okay I set up my variables like this: $FName= $_POST("FName"); the rest of the code is fine but...for some reason this code calls an undefined function error. Fatal error: Call to undefined function: array() Could someone please help me??
  3. Where does this apply at though, in my PHP Variables??? or in each of my forms???
  4. When I am setting up my html forms for submission to my database, I cant figure out how to get the stuff from my forms to be connected to my PHP code for submission. I've tried a couple of different methods and none have worked.
  5. My question is how do i connect my forms to my PHP code to insert in my MySQL database. I have so far: <form action="http://www.seceng.com/secure/insert.php" method="POST" language="PHP" name="Insert"> ----all my HTML form information------ </form>
  6. what if i need to do multiple queries?
  7. this is about the second day that ive done php so i really have no idea, so anything would help.
  8. Here is my actual code now: <? mysql_query($query); mysql_query($query17); mysql_query($query18); mysql_query($query19); mysql_query($query20); mysql_query($query21); mysql_query($query22); mysql_query($query23); mysql_query($query24); mysql_query($query25); mysql_connect($host, $username, $password, $db); mysql_close() ?>
  9. <? // run query 1-16 $result = mysql_query($query); // run query 17 $result = mysql_query($query17); // run query 18 $result = mysql_query($query18); // run query 19 $result = mysql_query($query19); // run query 20 $result = mysql_query($query20); // run query 21 $result = mysql_query($query21); // run query 22 $result = mysql_query($query22); // run query 23 $result = mysql_query($query23); // run query 24 $result = mysql_query($query24); // run query 25 $result = mysql_query($query25); // connect to database // $dbh = mysql_connect($host, $username, $password, $db); if (!$dbh) { die('Could not connect: ' . mysql_error()); } // close transaction // mysql_close(); ?> and than my variables
  10. Okay well my php code works...but when i check my mysql database nothing has changed....???
  11. I've redone the code like you guys have suggested but everytime i try to open the file in my browser it says: call to undefined function: mysqli_query()
  12. Im new at PHP, and i need someone to check my code for me: <? // connect to database // $dbh = mysqli_connect($host, $username, $password, $db); // turn off auto-commit mysqli_autocommit($dbh, FALSE); // end connection // // run query 1 $result = mysqli_query($dbh, $query1); if ($result !== TRUE) { mysqli_rollback($dbh); // if error, roll back transaction } // run query 2 $result = mysqli_query($dbh, $query2); if ($result !== TRUE) { mysqli_rollback($dbh); // if error, roll back transaction } // end query // echo "Submission Completed!"; // close transaction // mysqli_close(); ?> and than i have a bunch of variables
×
×
  • 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.