NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
PHPEd local web server not parsing embedded php code in html


Joined: 21 Aug 2003
Posts: 1
Reply with quote
Hi All,

I'm evaluating PHPEd ver. 3.2 build 3220. Under Tools -Settings-Run Mode, I select HTTT Mode(SRV local web server)l.

My SRV local web server does not parse php embedded in html body, my test.php file is below:

<html>
<head> </head>
<body>
<?php
function display($result)
......code to display
?>

<form method="GET" ACTION="test.php">
<input type="text" name="varName">
<input type="SUBMIT" value="Search">
</form>

<?php
}
else {
// Open the database connection
$connection = mysql_connect"localhost:54664", "root", "rootpass");
mysql_select_db("dbaseName", $connection);
//Query
$result = mysql_query(..............)
display($result);
mysql_close($connection);
}
?>
</body>
</html>

As I understand, the SRV local web server works the same as Apache, "any request from a Web browser to the specified port is sent directly to the phpED server. Server modifies this request, passes it to php executable, captures an output returned from it and passes this output back to the browser" (php Help).

When test.php is executed, my form is display, when I enter a value and click submit, the there is nothing returned.

Is there something wrong with my setting?

Thanks,
View user's profileFind all posts by LangSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7897
Reply with quote
$varName should not be set after the submit.
Really, it is since php version 4.1.0
Read php.net site regarding register_globals setting and issues.
You'll have to use $_POST and $_GET arrays.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
PHPEd local web server not parsing embedded php code in html
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic