Having a little bit of trouble in redirecting to another page after updating a record. I am using Adobe GoLive 6 with PHP just to provide some background.

Here's what I can do:
- I can update a record and return to the current page
- I can update a record and redirect to another pager

What I can not do and would like to do:
- update the record and then redirect also passing a variable.

Here's the latest code snippet I used:

<td width="108" height="55" valign="top" align="left" xpos="42"><input type="submit" name="_SubmitChanges" <?php SetupMySQLUpdate('EditProfile.php?uname=echo "$yn"', '$return', $UpdateRide) ?>></td>

so...when it does it's redirect, it is displaying as:
[url]http://..../EditProfile.php?uname=echo[/url]"yn"

it should be doing something like:
[url]http://..../EditProfile.php?uname=Bob[/url]

I have tried coding in so many different ways but never achieve the desired goal.

I have even included this code on my page just to confirm that $yn has data:

<?php
$yn=$UpdatedRec->Value("sname");
echo $yn;
?>

result:
Bob

can someone out here assist me in this?

thx

    i don't know SetupMySQLUpdate looks like but i assume you should be calling the fucntion like this:

    SetupMySQLUpdate("EditProfile.php?uname=$yn", $return, $UpdateRide)

      Yep...tried that:

      result:
      /EditProfile.php?uname="$yn"&PHPSESSID=02fb7eaadec849

      I think it has something to do with the single quotes and using other quotes with it......i think.

      I have also tried the more logical:
      'EditProfile.php?uname=$yn'

      result:
      /EditProfile.php?uname=$yn&PHPSESSID=02fb7e

      Just can't get it to say "Bob" instead of $yn.

      🙁

        Originally posted by devinemke
        i don't know SetupMySQLUpdate looks like but i assume you should be calling the fucntion like this:

        SetupMySQLUpdate("EditProfile.php?uname=$yn", $return, $UpdateRide)

        [/B]

        well....this one worked....ty so very kindly

        is there any difference from using a single ' as to opposed to a double "?

          Originally posted by James0816
          is there any difference from using a single ' as to opposed to a double "?

          yes. read this.

            Originally posted by devinemke
            yes. read this.

            ahhhhh......very good....ty once again....oh soooo much to still learn. 🆒

              Write a Reply...