what is the URL in the browser’s address bar?
19 Replies - 909 Views - Last Post: 25 February 2013 - 09:17 AM
#17
Re: PHP/MySQL Not Inserting to Database
Posted 25 February 2013 - 06:35 AM
file:///C:/wamp/www/reg.php?firstname=Blake&lastname=Teeple&age=20
That is the URL for when I enter data into my form. I tested the php file using localhost/reg.php giving values to firstname, lastname, and age and it worked fine with entering it into the database. But when I enter data into the form and click submit, the entries in the form are not getting passed over for some reason.
That is the URL for when I enter data into my form. I tested the php file using localhost/reg.php giving values to firstname, lastname, and age and it worked fine with entering it into the database. But when I enter data into the form and click submit, the entries in the form are not getting passed over for some reason.
#18
Re: PHP/MySQL Not Inserting to Database
Posted 25 February 2013 - 06:38 AM
I should have known it ...
bring up the source code after you submitted the form and you should be enlightened.
when you submit a form through the file:// protocol, you have no server and hence no PHP to execute it.
bring up the source code after you submitted the form and you should be enlightened.
when you submit a form through the file:// protocol, you have no server and hence no PHP to execute it.
#19
Re: PHP/MySQL Not Inserting to Database
Posted 25 February 2013 - 09:15 AM
That made sense, I just saved it as a php file instead of html, and now everything works.
Sorry for being a burden. But thanks for the help! I know to just save them all as php from now on.
Sorry for being a burden. But thanks for the help! I know to just save them all as php from now on.
#20
Re: PHP/MySQL Not Inserting to Database
Posted 25 February 2013 - 09:17 AM
rule of thumb: always always always run a web application from a server, even if it does not contain a server script.
|
|

New Topic/Question
Reply




MultiQuote


|