As a complete beginner on PHP forms, I have been following an excellent tutorial which has guided me through making the form but I have no idea where to put it! My hosting provider is Krystal. I have a directory with the php script file saves to it and then a html file with the form. The php script is uploaded but the form isnt yet as I tried to get it to work a couple of months ago with no joy.
I believe Krystal will let you use your own php script but am awaiting a reply confirming this from the helpdesk.
Any help would be gratefully received!
Page 1 of 1
PHP form - what do I do with it?
#2
Posted 06 January 2012 - 02:53 AM
Well firstly looking at their website it seems their plans do indeed support PHP scripts.
Generally the idea behind it all is that you'll make a form, each input element will have a unique value for the 'name' attribute.
Depending on where you've set your form action the data within the input elements will be sent there via either the POST or GET array, depending on what you set the form method as (i'd recommend using POST) after the user has submitted.
And then in your PHP script where you have posted the data to, you'd most likely write a SQL insert statement, inserting the various POSTed values into your database.
Here's a little tutorial i'd suggest you read: http://www.w3schools...ysql_insert.asp
Generally the idea behind it all is that you'll make a form, each input element will have a unique value for the 'name' attribute.
Depending on where you've set your form action the data within the input elements will be sent there via either the POST or GET array, depending on what you set the form method as (i'd recommend using POST) after the user has submitted.
And then in your PHP script where you have posted the data to, you'd most likely write a SQL insert statement, inserting the various POSTed values into your database.
Here's a little tutorial i'd suggest you read: http://www.w3schools...ysql_insert.asp
Share this topic:
Page 1 of 1
Help














