Current location: Hot Scripts Forums » General Community » Script Requests » cannot send variable to new page (code included)


cannot send variable to new page (code included)

Closed Thread
  #1 (permalink)  
Old 12-17-03, 07:42 AM
brucewestfall brucewestfall is offline
Newbie Coder
 
Join Date: Dec 2003
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy cannot send variable to new page (code included)

Here is the code for both pages. I've included the url from my browser. Other pages seem to work fine, but I can't get the variable to show up on other pages.
Php version 4.2.2
Opera version 7.21

// http://localhost/optiontest.html

<HTML>
<BODY>
<form action="optiontest.php" method="post">
<SELECT NAME="firstname">
<OPTION value = "Bruce">Bruce</OPTION>
<OPTION value = bruce>bruce</OPTION>
</SELECT>
<br>
<input type=submit value="TEST IT">
</form>
</BODY>
</HTML>

//http://localhost/optiontest.php
<?
echo "This prints<br>";
echo $firstname;
echo "<br>...but the name didn't";
?>


Help would be really cool.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
  #2 (permalink)  
Old 12-17-03, 11:53 AM
kurdapya kurdapya is offline
Newbie Coder
 
Join Date: Dec 2003
Location: philippines
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
hey.. your codes are just fine..
i guess it's the php version and the server you have to check

gud luck


Quote:
Originally Posted by brucewestfall
Here is the code for both pages. I've included the url from my browser. Other pages seem to work fine, but I can't get the variable to show up on other pages.
Php version 4.2.2
Opera version 7.21

// http://localhost/optiontest.html

<HTML>
<BODY>
<form action="optiontest.php" method="post">
<SELECT NAME="firstname">
<OPTION value = "Bruce">Bruce</OPTION>
<OPTION value = bruce>bruce</OPTION>
</SELECT>
<br>
<input type=submit value="TEST IT">
</form>
</BODY>
</HTML>

//http://localhost/optiontest.php
<?
echo "This prints<br>";
echo $firstname;
echo "<br>...but the name didn't";
?>


Help would be really cool.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
  #3 (permalink)  
Old 12-19-03, 12:32 AM
MadDog MadDog is offline
Code Master
 
Join Date: Aug 2003
Posts: 935
Thanks: 0
Thanked 0 Times in 0 Posts
Topic moved to more appropriate forum.
__________________
Drew Gauderman
ASP - MSSQL Coder / Buisness Owner / Coder for Hire!
MSN-ICQ-AIM-YIM in Profile

http://www.iportalx.net an easy ASP portal system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Closed Thread

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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 On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to read a web page content to a variable? wings01234 JavaScript 4 01-13-04 09:27 AM
index page not showing up skipper23 PHP 3 12-15-03 02:10 PM
echo foriegn html in static page fergusom Everything Java 4 11-10-03 03:35 AM
how do i add a record AND send an email in one step? nickleidecker ASP 2 10-14-03 08:12 PM
asp: URGENT! need to change code to create new form per id seala ASP 2 09-09-03 10:54 PM


All times are GMT -5. The time now is 10:42 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.