get and html text

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bob Bedford

    get and html text

    I've to send many emails using a script that refresh every n seconds to
    avoid server timeout (can't be bypassed).

    Now, I've a loop wich detects how long does the script (a loop) takes to
    run. If the script is close to the 25 seconds, then I redirect to itself
    passing some values.

    One of the value is some html code. Then I get it in variable, add some
    text and so on, until threre is no more values in the database.

    Now, passing the variables I do this:

    ($message contains the HTML code).

    header('locatio n:'.$_SERVER['PHP_SELF'].'?message='.$m essage);

    but doing a $message = $_GET['message']; I get nothing in the $message
    variable.
    why ? any idea?

    I've tried to do so:
    header('locatio n:'.$_SERVER['PHP_SELF'].'?message='.ht mlentities($mes sage));

    (I added htmlentities function) but it doesn't work.

    Any idea why ?

    Bob


  • Erwin Moller

    #2
    Re: get and html text

    Bob Bedford wrote:
    [color=blue]
    > I've to send many emails using a script that refresh every n seconds to
    > avoid server timeout (can't be bypassed).
    >
    > Now, I've a loop wich detects how long does the script (a loop) takes to
    > run. If the script is close to the 25 seconds, then I redirect to itself
    > passing some values.
    >
    > One of the value is some html code. Then I get it in variable, add some
    > text and so on, until threre is no more values in the database.
    >
    > Now, passing the variables I do this:
    >
    > ($message contains the HTML code).
    >
    > header('locatio n:'.$_SERVER['PHP_SELF'].'?message='.$m essage);
    >
    > but doing a $message = $_GET['message']; I get nothing in the $message
    > variable.
    > why ? any idea?
    >
    > I've tried to do so:
    >[/color]
    header('locatio n:'.$_SERVER['PHP_SELF'].'?message='.ht mlentities($mes sage));[color=blue]
    >
    > (I added htmlentities function) but it doesn't work.
    >
    > Any idea why ?[/color]

    Try urlencode($mess age)
    That is what urlencode is for. Do not use htmlentities because that is
    something completely different.

    Regards,
    Erwin Moller
    [color=blue]
    >
    > Bob[/color]

    Comment

    • Bob Bedford

      #3
      Re: get and html text

      > Try urlencode($mess age)[color=blue]
      > That is what urlencode is for. Do not use htmlentities because that is
      > something completely different.
      >[/color]
      Thanks Erwin, it works !

      Bob

      Comment

      Working...