Unique php page

Discussion in 'Scripts, 3rd Party Apps, and Programming' started by bunglebrown, Oct 1, 2008.

  1. xav0989

    xav0989 Community Public Relation Community Support

    Messages:
    4,467
    Likes Received:
    95
    Trophy Points:
    0
    Well then you can check that the $memid variable is set before the page content is displayed, and then redirect if not set.
     
  2. bunglebrown

    bunglebrown New Member

    Messages:
    157
    Likes Received:
    0
    Trophy Points:
    0
    Following on from my previous post - is it possible to send the $SESSION variable to email because when I put $_SESSION['memid'] into the email message it returns an error.
     
  3. freecrm

    freecrm New Member

    Messages:
    629
    Likes Received:
    0
    Trophy Points:
    0
    Again, I refer to my post on page 1.

    It might be worthwhile to let us know what the error is.
     
  4. bunglebrown

    bunglebrown New Member

    Messages:
    157
    Likes Received:
    0
    Trophy Points:
    0
    We might be crossing wires here - the page that sends the mail link to the user is working great but I was considering getting the memid mailed to me on the link page with other information (which is coming through fine).

    The error is:

    Line 2939 is:

    PHP:
    $message "'$_SESSION['memid']'";
    I tried it as a few things but with no success. Any ideas?

    _Thanks
     
  5. freecrm

    freecrm New Member

    Messages:
    629
    Likes Received:
    0
    Trophy Points:
    0
    You need to inspect the code more carefully on page 1 of this post.

    In order for a variable to be printed within the message, you need to break the code up with stops.

    i.e.

    PHP:
    $message'
    some normal html text without any single quotes but can include double quotes'
    .$variable.' more normal text';
    alternatively, you can use double quotes but in the following format.

    PHP:
    $message"
    some normal html text without any double quotes but can include single quotes"
    .$variable." more normal text";
    As you can see, the double quote stops the content before the variable. The stop adds something after to the previous content. The stop after the variable adds more content. The the opening double quotes continues the normal content.

    In this way, you can mix multiple variables and standard html. Just be careful of the type of quotes.

    PHP:
    $message "variable 1:".$_SESSION['memid']."<br>variable 2:".$anothervariable."<br><table><tr><td>&nbsp;</td></tr></table>";
     
  6. bunglebrown

    bunglebrown New Member

    Messages:
    157
    Likes Received:
    0
    Trophy Points:
    0
    I used it in this example and followed your instructions rigidly on page 1 and this error came back which I'm not sure how to deal with:

    Are you familiar with this and how do you suggest I overcome it?

    _Thanks
     
  7. freecrm

    freecrm New Member

    Messages:
    629
    Likes Received:
    0
    Trophy Points:
    0
    Are you using global variables?
     
  8. bunglebrown

    bunglebrown New Member

    Messages:
    157
    Likes Received:
    0
    Trophy Points:
    0
    no, should I? Not sure of the exact technique of this if it is necessary
     
  9. cursedpsp

    cursedpsp New Member

    Messages:
    237
    Likes Received:
    0
    Trophy Points:
    0
    Its impossible to do it in HTML, anything that requires fuctions HTML cannot support - however though, by linking to an external or internal javascript you can "reference" to a javascript function.
    Like

    "<a href='javascript: function(countPages);'>Count Pages</a>"

    Like so - but i am no good at JavaScript, only PHP
     

Share This Page