jagguy Posted October 12, 2006 Share Posted October 12, 2006 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 . Quote Link to comment https://forums.phpfreaks.com/topic/23743-form-data/ Share on other sites More sharing options...
wildteen88 Posted October 12, 2006 Share Posted October 12, 2006 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 [url=http://www.php-mysql-tutorial.com/]php-mysql-tutorial.com/[/url]. 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. Quote Link to comment https://forums.phpfreaks.com/topic/23743-form-data/#findComment-107912 Share on other sites More sharing options...
komquat Posted October 12, 2006 Share Posted October 12, 2006 No CGIJust use POST in your formThen 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]'"; Quote Link to comment https://forums.phpfreaks.com/topic/23743-form-data/#findComment-107913 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.