I am very new to php programming and particularly in eclipse. I am having this problem that wasn’t happening before.
My file is called index.php, I have only one file called, which is index.php, and I have this very simple code in it. Basically my code just call itself:
<form id="form1" name="form1" method="post" action='index.php'>
<label>
<input name="textfield" type="text" id="textfield" />
</label>
<label>
<input type="submit" name="submitcontent" id="submitcontent" value="extract files" />
</label>
</form>
When I run the code and click the submit button, instead of reloading index.php as I have put in the action request, the output is a white page with a string “index.php”. I spent several hours trying to find the error with no hope.
Can you please advice what is my mistake,
What is keeping me wondering is if I run this code in dreamweaver, it works perfectly i.e. reloading the index.php as it is suppose to do.
Many thanks
// EDIT: Here is the full code as requested..
In eclipse I use debug as PHP script. Does it matter ?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head></head>
<body class="twoColLiqLtHdr">
<form id="form1" name="form1" method="post" action='index.php'>
<label>
<input name="textfield" type="text" id="textfield" />
</label>
<label>
<input type="submit" name="submitcontent" id="submitcontent" value="extract files" />
</label>
</form>
</body>
</html>
Thank you
I have solved the problem. So here are the mistakes I made:
1- My problem wasn’t really with PHP or Eclipse but rather with the server. My debugger wasn’t configured correctly.
2- I was debugging using PHP script and not PHP webpage. The former can debug without the need to connect to the server (just a script), while the latter debug the web page on the server.
Once I ensured that my debugger is setup correctly using php -m then setting PDT was a piece of cake.