Form Script Question

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

    Form Script Question



    Hi
    Can anyone tell me why my form script fails at this line
    <form action="$_SERVE R['PHP_SELF']" method="POST">

    when running on my ISP which is using PHP version 4.3.2,
    Configure Command './configure' '--prefix=/usr/local'
    '--with-apache=/home/shells/chriss/Apachetoolbox-1.5.66/apache_1.3.27'
    '--enable-exif' '--enable-track-vars' '--with-calendar=shared '
    '--enable-magic-quotes' '--enable-trans-sid' '--enable-wddx' '--enable-ftp'
    '--enable-inline-optimization' '--enable-memory-limit'
    '--with-openssl=/usr/local/ssl'




    but works on my Linux box running running PHP version 4.3.1.
    Configure Command './configure' '--with-config-file-path=/etc/httpd'
    '--with-mysql=/usr' '--with-exec-dir=/usr/bin' '--with-apxs=/usr/sbin/apxs'
    '--with-java=/usr/java/jdk1.3.1' '--disable-cli' '--includedir=/usr'
    '--with-gdbm' '--with-db' '--enable-track-vars' '--with-zlib-dir=/usr/'
    '--with-gd=/usr'



    I'll supply more inf if needed.

    Thanks in advance
    Bill Zapp



  • Rudolf Horbas

    #2
    Re: Form Script Question

    Zapp,
    [color=blue]
    > Can anyone tell me why my form script fails at this line
    > <form action="$_SERVE R['PHP_SELF']" method="POST">[/color]

    If You're in HTML, the line should read
    <form action="<?=$_SE RVER['PHP_SELF']?>" method="POST">

    If this in an echo statement or a variable ect, it should be:
    <form action=\" . "$_SERVER["PHP_SELF"] . "\" method=\"POST\" >
    or shorter:
    <form action=\"$PHP_S ELF\" method=\"POST\" >

    Thats all I can do without the rest of the code, but it looks like it's
    easy to fix ...

    rudi

    Comment

    • Rudolf Horbas

      #3
      Re: Form Script Question

      > echo <<<END[color=blue]
      > <form action="$_SERVE R['PHP_SELF']" method="POST">[/color]

      Here You go.
      It's the quotes around the $_SERVER array index.
      Neither '' nor "" will work.

      If you want to use the heredoc syntax, use
      <form action="$_SERVE R[PHP_SELF]" method="POST">
      or just
      <form action="$PHP_SE LF" method="POST">

      rudi

      Comment

      • Rudolf Horbas

        #4
        Re: Form Script Question

        (Sorry, first message was a reply to myself ...)
        [color=blue]
        > echo <<<END
        > <form action="$_SERVE R['PHP_SELF']" method="POST">[/color]

        Here You go.
        It's the quotes around the $_SERVER array index.
        Neither '' nor "" will work.

        If you want to use the heredoc syntax, use
        <form action="$_SERVE R[PHP_SELF]" method="POST">
        or just
        <form action="$PHP_SE LF" method="POST">

        rudi

        Comment

        • Rudolf Horbas

          #5
          Re: Form Script Question

          (Sorry, first message was a reply to myself ...)
          (darn, again! whats mozilla up to? :-( )
          [color=blue]
          > echo <<<END
          > <form action="$_SERVE R['PHP_SELF']" method="POST">[/color]

          Here You go.
          It's the quotes around the $_SERVER array index.
          Neither '' nor "" will work.

          If you want to use the heredoc syntax, use
          <form action="$_SERVE R[PHP_SELF]" method="POST">
          or just
          <form action="$PHP_SE LF" method="POST">

          rudi

          Comment

          • Zapp

            #6
            Re: damn, i didn't post _here_!

            Rudi

            No problem with the reposts, just glad to see you're not using MS ;)
            Anyway, your fix worked thank you very much for taking the time to respond!
            Zapp


            "Rudolf Horbas" <rhorbas@hypote xt.de> wrote in message
            news:bhj9uk$nrm $4@svr8.m-online.net...[color=blue]
            > Sorry zapp, Mozilla keeps posting to my own reply, 'though I'd marked
            > Your post. Guess You'll find this anyway, but it's embarassing for me ...
            >
            > anyone know 'bout this moz behaviour? or am i making some stupid mistake?
            >
            > rudi
            >[/color]


            Comment

            Working...