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

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:
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
  #1  
Old September 3rd, 2002, 04:53 AM
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
Redirection and pass value to another page?


I have some problems about my project:

The user can add or remove symbols from their list, and can see
the list result immediately on the same page once they did add or
remove. So my Form Action has to be $PHP_SELF. But I want to
link to another page "trading.php" and pass the value
of $symbol to it once the user click the "trade" image button.

1. How to link to another page?
2. How to pass the value of $symbol?
Thanks!


------monitor.php------

echo("<form action="".$_SERVER['$PHP_SELF']."" method="post">");
echo("<table>");

while ($rec = mysql_fetch_array($result)){
....
$symbol=$rec["symbol"];
echo("<tr><td>".$symbol."</td>");
echo("<td><input type="image" src="arrow1.gif" name="trade" value="".$rec["symbol"].""></form></td><tr>");
}

echo("</table>");

echo("<BR>Symbol:
<input type="text" name="symbol">
<input type="submit" name="addstock" value="Add Stock">
<input type="submit" name="removestock" value="Remove Stock">
");
echo("</form>");


Reply With Quote
  #2  
Old September 3rd, 2002, 07:32 AM
Nimco Nimco is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 132 Nimco User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via AIM to Nimco
RE: Redirection and pass value to another page?

If I understand your question correctly, then you either need to include trading.php on your page as an iframe or similar, or write the data to a file which trading.php will then retrieve when it loads

Reply With Quote
  #3  
Old September 4th, 2002, 01:23 AM
zombie zombie is offline
Codewalkers Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2007
Location: serbia
Posts: 1,876 zombie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: Redirection and pass value to another page?

u can do it in several ways:

1) u can use javascript to change action of a <form> tag when a user clicks "trade" button

2) or have a complitely diferent <form> tag for a trade button, and again use javascript to copy $symbol value to a hidden field on a second form

3) or use what Nimco said...

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Coding > Redirection and pass value to another page?


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