Jump to content


Photo

PHP and HTML


  • Please log in to reply
1 reply to this topic

#1 firedrop84

firedrop84
  • Members
  • PipPipPip
  • Advanced Member
  • 49 posts

Posted 19 March 2006 - 02:14 PM

Hello Everyone!

I am developing a website that I use PHP and I am new into it.

I have a form that the browser will enter the details into it. I wanted it after that to store all the details into a database. I was reading some books for PHP and I already figured out how to do that.

based on the book that I read. It says I should seperate the PHP and HTML into different files and this is what I done but the problem that I am facing of that that when I click on submit button it goes to the php and shows empty screen.

all the html code for the form is into a file .html and then I used the action= to the php file.

do anyone knows how can I solve this problem

I would really approciate that.

Regards,
firedrop

#2 AV1611

AV1611
  • Members
  • PipPipPip
  • Advanced Member
  • 997 posts

Posted 19 March 2006 - 02:59 PM

As stated, either the book is wrong, you you misunderstood what the book told you...

You would create the PHP file that handles your form, then after it is finished, you may add your HTML to the same page to either display a result, or redirect them somewhere else, or whatever...

One of a millions things you can do...please ignore any syntax errors...
<?php
// Process your form
?>
<HTML>
<body>
<h1> Your form has been submitted. Please click the button below to continue...</h1>
<form name = "DONE" action="nextpage.html">
<input type="button" >
</form>
</body>
</HTML>





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users