Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 22nd, 2003, 06:05 AM
Registered User
 
Join Date: Nov 2003
Location: , , New Zealand.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to mespejo Send a message via Yahoo to mespejo
Default Can't display input variable passed on to php code

I have read similar problems posted on this forum regarding not being able to display input value called from html form & passed on to php - refer to the code below. I have tried the following recommendation but still can't make it work.

1) set "register_globals=off" in php.ini.
2) have used "$_GET[]" to display variable.

I'm running IIS 5.0 on W2K & PHP v4.3.4.

Any other idea?

HTML code:
-------------------------
<HTML>
<HEAD></HEAD>
<BODY>
<FORM METHOD=GET ACTION="text.php">

Who is your favourite author?

<INPUT NAME="Author" TYPE="text">
<BR>
<BR>
<INPUT TYPE=SUBMIT>
</FORM>
</BODY>
</HTML>


PHP code:
-------------------------
<html>
<head></head>
<body>
Your favourite author is:
<?php
echo $_GET['Author'];
?>
</body>
</html>

Reply With Quote
  #2 (permalink)  
Old November 22nd, 2003, 03:41 PM
richard.york's Avatar
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

If that doesn't work then perhaps you have a problem with how PHP is set-up.

Can you see output from this script?:

<?php
phpinfo();
?>

: )
Rich


:::::::::::::::::::::::::::::::::
Smiling Souls
http://www.smilingsouls.net
:::::::::::::::::::::::::::::::::
Reply With Quote
  #3 (permalink)  
Old November 25th, 2003, 03:32 PM
Registered User
 
Join Date: Nov 2003
Location: , , New Zealand.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to mespejo Send a message via Yahoo to mespejo
Default

Hi Rich,
Thanks for your input. PHP was reinstalled and now it's working perfectly.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I need help with php variable passed to perl... nriv08 Beginning PHP 0 October 9th, 2008 12:54 PM
Global variable passed from s/proc not accepted ssharrock SQL Server DTS 1 February 24th, 2005 12:28 AM
PHP Session passed to different sub domains h8dk97 Pro PHP 3 November 6th, 2003 10:20 PM
form data not passed to php keng BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 2 September 4th, 2003 09:15 AM
Display bar code in a Form using user input text? phoenixcu Access VBA 1 June 6th, 2003 02:39 AM



All times are GMT -4. The time now is 06:57 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.