Re: Passing varibles
| From: | Richard Lynch | Date: | Mon, 05 Aug 2002 07:30:33 +0000 |
| Subject: | Re: Passing varibles | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-111181@lists.php.net to get a copy of this message | ||
>Hi,
>
>I'm sorry.. I don't really have any idea what I'm doing, but I almost
>got this thing working. If someone could help, I'd deeply appreciate it.
>
>I need to get these variables to the next script (edit_scores.php3):
>$the_Score, $player_name
>so I can update the field (s1) WHERE the last_name is $player_name
>
>I'm pretty close with this:------------
>
>// Display the scores
> while ( $row = mysql_fetch_array($result) ) {
>echo("<table border='0' cellpadding='3'
>cellspacing='0'>" .
>"<tr>".
> "<td>". $row["last_name"]. "</td>" .
> "<td>". $row["first_name"] ."</td>".
> "<td></td><td></td><td></td>".
>"</tr>".
>"<tr>".
> "<td>".$row["s1"] ."</td>".
> "<td>"."<form action = edit_score.php3>".
> "</td>".
> "<td>"."<input type='text' name='the_score'
> size='3'>"."<input
>type='hidden' name='$player_name'>"."</td>".
> "<td>"."<input type='submit' name='s1'
> value='edit'>"."</td>".
> "<td>"."</form>"."</td>".
>"</tr>".
>
>etc..etc.. more scores -------------------------
>
>$the_score is passed ok... but how do I include passing the
>$player_name?
>
>The result from above in the url is:
>cpa_golf/edit_score.php3?the_score=23&nichols=++&s1=edit
>
>"nichols" is "$player_name" but is will not echo in the script.
It's probably $_POST['player_name'] not in $player_name.
Also, older browsers won't let you put the FORM tag inside a TD and then
have INPUT and the /FORM in other TD tags...
Put the FORM and /FORM outside the whole TABLE if it doesn't all fit inside
a single TD tag:
<FORM>
<TABLE>
.
.
.
</TABLE>
</FORM>
I dunno how far back this problem goes, so maybe it's version 2 browsers...
Oh well. Better safe than sorry.
--
Like Music? http://l-i-e.com/artists.htm
I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
major distro). Need to record live events (mixed already) to stereo
CD-quality. Soundcard Recommendations?
Software to handle the recording? Don't need fancy mixer stuff. Zero (0)
post-production time. Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
audio-to-disk.