SunQuest
           PHP Installation
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Installation

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today!
  #1  
Old February 2nd, 2003, 06:31 PM
Zeeuw Zeeuw is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 4 Zeeuw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Running PHP from Form

Hi,

I've just installed PHP (Win 98 and Apache webserver) and php-files I run by entering http://localhost/someting.php in my browser run correctly.

However when I try to run a php-file from, for example, a form (I'm following a quick course) in a HTML page, it doesn't work.

Can somebody help me out with this one?

Thanx,

Zeeuw

Reply With Quote
  #2  
Old February 2nd, 2003, 06:38 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: Running PHP from Form

Could you give a specific example of what is not working for you?

Reply With Quote
  #3  
Old February 2nd, 2003, 07:14 PM
Zeeuw Zeeuw is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 4 Zeeuw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: Running PHP from Form

In the following PHP file, the echo text is not displayed!

<html>
<head>
<title>Test</title>
</head>
<body>
<h1>PHP tester</h1>
<?
echo "<p>Does it work? ";
?>
</body>
</html>

Reply With Quote
  #4  
Old February 2nd, 2003, 07:26 PM
superalloy superalloy is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Washington DC
Posts: 58 superalloy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Running PHP from Form

It works for me, the tags might not be set up to read short tags <? ?>, try using <?php ?>
you can check the php.ini file to see if:
short_open_tag = On

if so, then it should work for you.

Reply With Quote
  #5  
Old February 2nd, 2003, 07:40 PM
Zeeuw Zeeuw is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 4 Zeeuw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: Running PHP from Form

The file itself works also on my pc when I type localhost/filename.php in the address bar of my browser. However when I call this file from within a Form, it doesn't work, that's the problem.

Reply With Quote
  #6  
Old February 2nd, 2003, 07:50 PM
superalloy superalloy is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Washington DC
Posts: 58 superalloy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Running PHP from Form

What does the html form look like?
should be something like:
php Code:
Original - php Code
  1.  
  2. <html>
  3. <body>
  4. <form method=post action="test.php">
  5. <input type="submit">
  6. </form>
  7. </body>
  8. </html>

Reply With Quote
  #7  
Old February 2nd, 2003, 08:03 PM
Zeeuw Zeeuw is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 4 Zeeuw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: Running PHP from Form

This is the code for the Form, in which test.php is called, however in the file test.php (for code see previous post) the php code doesn't run!

I can see the (HTML) text and in the sourcecode on the loaded page(test.php) the php code can be read, however is not displayed on the loaded page.

<html>
<head>
<title>Test</title>
</head>
<body>
<h1>Test</h1>

<form action="test.php" method=post>
<table border=0>
<tr>
<td>Variable input</td>
<td align=center><input type="text" name="TVar" size=3 maxlength=3></td>
</tr>
<tr>
<td colspan=2 align=center><input type="submit" value="Submit"></td>
</tr>
</table>
</form>

</body>
</html>

Reply With Quote
  #8  
Old February 2nd, 2003, 09:13 PM
superalloy superalloy is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Washington DC
Posts: 58 superalloy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Running PHP from Form

does the url for the php file show up in the browser with the http path "http://localhost/..." or the local path "C:/..."

Reply With Quote
  #9  
Old February 2nd, 2003, 09:25 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: Running PHP from Form

It shows up with c:/.../test.php

Reply With Quote
  #10  
Old February 2nd, 2003, 09:36 PM
superalloy superalloy is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Washington DC
Posts: 58 superalloy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Running PHP from Form

try changing the form html page to read:
php Code:
Original - php Code
  1.  
  2. ...
  3. <form action="http://localhost/.../test.php" method=post>
  4. ...

and see if that works. Unless,... which URL does the form page use?

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Installation > Running PHP from Form


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway