Jump to content


form data

  • Please log in to reply
2 replies to this topic

#1 jagguy

  • Members
  • PipPipPip
  • Advanced Member
  • 226 posts

Posted 12 October 2006 - 09:14 AM

If I want to send information on a form to a mysql db using php, do I need to use a cgi-script?

I want the user to send data .

#2 wildteen88

  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 12 October 2006 - 02:16 PM

You dont need to use cgi-script.

PHP is more than capable of doing what you want to do. If you are unsure on what to do, then prehaps it'll be handy for you tot goto php-mysql-tutorial.com/. I suggest you read through tutorials 3 throught to 7. If you are new to pHP and dont quite get the PHP syntax then start with tutorial number 2.

#3 komquat

  • Members
  • PipPipPip
  • Advanced Member
  • 130 posts
  • LocationHoughton, MI

Posted 12 October 2006 - 02:18 PM


Just use POST in your form

Then what ever file you have it going to set up the php to input or update the DB

<form method="post" action="where_ever.php">

Then on where_ever.php set up your connections and write the sql you want:

$sql = "UPDATE table SET field = '$_POST[variable]' WHERE field2 = '$_POST[variable2]'";

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users