Form Script Question

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default Form Script Question



    Hi
    Can anyone tell me why my form script fails at this line
    <form action="$_SERVER['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



    Zapp Guest

  2. Similar Questions and Discussions

    1. Form Mail Script
      Hello, could anyone tell me exactly how to edit the script to make it work and where to place the files on my website directories? I've been...
    2. Coldfusion mail script and flash form question
      Suggestions anybody? I have a basic form in flash which calls a cfm script, but somehow the cfm script does not pass on the form content to the...
    3. Generic form script?
      Is there someplace that I can download a generic CGI script that I can use to process forms from PDF? Here's what I need: 1- a generic script that...
    4. form upload images using php form script
      Hi, I normally use CGI to process my html forms. However, this time I need/want to use PHP. Can anyone point me in the direction of a php...
    5. Newbie question: I need an ASP script to store data from a form.
      I want to have a HTML form that the user fills in and clicks submit. I then want the data to be stored in an Access datatbase. I've loooked and...
  3. #2

    Default Re: Form Script Question

    Zapp,
    > Can anyone tell me why my form script fails at this line
    > <form action="$_SERVER['PHP_SELF']" method="POST">
    If You're in HTML, the line should read
    <form action="<?=$_SERVER['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_SELF\" method=\"POST\">

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

    rudi

    Rudolf Horbas Guest

  4. #3

    Default Re: Form Script Question

    > echo <<<END
    > <form action="$_SERVER['PHP_SELF']" method="POST">
    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="$_SERVER[PHP_SELF]" method="POST">
    or just
    <form action="$PHP_SELF" method="POST">

    rudi

    Rudolf Horbas Guest

  5. #4

    Default Re: Form Script Question

    (Sorry, first message was a reply to myself ...)
    > echo <<<END
    > <form action="$_SERVER['PHP_SELF']" method="POST">
    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="$_SERVER[PHP_SELF]" method="POST">
    or just
    <form action="$PHP_SELF" method="POST">

    rudi

    Rudolf Horbas Guest

  6. #5

    Default Re: Form Script Question

    (Sorry, first message was a reply to myself ...)
    (darn, again! whats mozilla up to? :-( )
    > echo <<<END
    > <form action="$_SERVER['PHP_SELF']" method="POST">
    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="$_SERVER[PHP_SELF]" method="POST">
    or just
    <form action="$PHP_SELF" method="POST">

    rudi

    Rudolf Horbas Guest

  7. #6

    Default 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@hypotext.de> wrote in message
    news:bhj9uk$nrm$4@svr8.m-online.net...
    > 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
    >

    Zapp Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139