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:
  #1  
Old February 2nd, 2003, 07: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, 07: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: 25
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, 08: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, 08: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: 3
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, 08: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, 08: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: 3
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, 09: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, 10: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: 3
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, 10: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: 25
RE: Running PHP from Form

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

Reply With Quote
  #10  
Old February 2nd, 2003, 10: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: 3
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




 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

Request Your Free Technology Downloads!
 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

Request Your Free Technology Downloads!
 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

Request Your Free Technology Downloads!
 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

Request Your Free Technology Downloads!
 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

Request Your Free Technology Downloads!
 

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




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek