|
Posted by Jerry Stuckle on 08/13/07 22:54
Big Moxy wrote:
> On Aug 13, 1:29 pm, Rik <luiheidsgoe...@hotmail.com> wrote:
>
> Well, perhaps I'm getting closer. The URL is now page1.php but now
> results message is not displayed. I've passed $_SESSION variables
> forward before but not back. The method I used for forward passing is
>
> session_start();
> foreach ($_POST as $key => $value) {
> $_SESSION[$key] = $value;
> }
>
> I tried that but it did not work in this scenario.
>
>
> Here is the delete code -
>
> if (mysql_query($deleteSQL,$emailmanager) &&
> mysql_affected_rows()>0) {
> $_SESSION["mysql_query_result"] = "Your email address has been
> successfully removed";
> }else {
> $_SESSION["mysql_query_result"] = "Your email address was not
> found. Please try again";
> }
>
> $deleteGoTo = "/casper/page1.php";
> if (isset($_SERVER['QUERY_STRING'])) {
> $deleteGoTo .= (strpos($deleteGoTo, '?')) ? "&" : "?";
> $deleteGoTo .= $_SERVER['QUERY_STRING'];
> }
> header(sprintf("Location: %s", "http://".$_SERVER['HTTP_HOST'].
> $deleteGoTo));
>
> Here is the page1 code -
>
> $result_message = "";
> if ((isset($_SESSION['mysql_query_result'])) &&
> ($_SESSION['mysql_query_result'] != "")) {
> $result_message = $_SESSION['mysql_query_result'];
> }
>
> ...
>
> <td align="center" colspan="2">
> <?php
> echo $result_message;
> ?>
> </td>
>
Do you have a session_start() call at the beginning of your second page,
also?
When you look at the page source in your browser, do you see the
"<td>..</td>" in there?
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|