Web Analytics Made Easy -
StatCounter Blank page causes form problem - CodingForum

Announcement

Collapse
No announcement yet.

Blank page causes form problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Blank page causes form problem

    I'm having a problem with forms... Why do I have forms on blank page?


    it doesn't show the forms and its BLANK page.. does my code is very messy?

    Tried to fix this:

    The post of "submit" I changed it to if (!empty($_POST['submit']))
    {

    The error says:

    Parse error: parse error in /home/httpd/vhosts/e-hosti.com/httpdocs/sending.php on line 36

    The line is ?>

    so my form script is really screwing up!

    thank you
    Last edited by fr0stx; Mar 1, 2004, 12:59 AM.
    http://e-hosti.com :: Our low cost web hosting packages... 99% Uptime... 30 Day Money Back Guarantee...

  • #2
    if(!empty($_POST['submit'])){

    is correct ...

    PHP Code:
    <?
    $headers 
    "From: REXCAXZOWCONEUQZAA\n" ;
    $headers .="Reply-To: E-hosti Customerrn" ;
    $headers .="X-Mailer: PHP/" phpversion() . "\n" ;
    mail($email$subject$message,$headers); 
    ?>
    will solve the parse error and is easier to read/edit , though the content of the headers From and Reply-to should be email address's else spam blockers will get you.

    Also ..

    $message = 'Hello $firstname $lastname,
    la la lala';


    shoud be ..

    $message = "Hello $firstname $lastname,
    la la lala";

    your form showing or not showing will depend on the contents of forms.php which we cant see
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

    Comment


    • #3
      Parse error: parse error in /home/httpd/vhosts/e-hosti.com/httpdocs/sending.php on line 35

      the line is ?>

      ohh noo!!!

      I live in perth too
      http://e-hosti.com :: Our low cost web hosting packages... 99% Uptime... 30 Day Money Back Guarantee...

      Comment


      • #4
        Here's the form:

        Code:
        First Name: <input type="text" size="15" name="firstname" value="<? echo $firstname; ?>">
        <br>
        Last Name: <input type="text" size="15" name="lastname" value="<? echo $lastname; ?>">
        <br>
        Subject: <input type="text" size="15" name="subject" value="<? echo $subject; ?>">
        <br>
        <input type='submit' value="Submit" name="submit">
        http://e-hosti.com :: Our low cost web hosting packages... 99% Uptime... 30 Day Money Back Guarantee...

        Comment


        • #5
          i fixed it but the page is BLANK!! argh.. i think its form fault? ive post it above this one
          Last edited by fr0stx; Mar 1, 2004, 01:00 AM.
          http://e-hosti.com :: Our low cost web hosting packages... 99% Uptime... 30 Day Money Back Guarantee...

          Comment


          • #6
            how come no one help me? hmmm

            edited: it was ";

            anyway my net buddy fixed my form sources.

            Thanks guys
            Last edited by fr0stx; Mar 1, 2004, 05:06 AM.
            http://e-hosti.com :: Our low cost web hosting packages... 99% Uptime... 30 Day Money Back Guarantee...

            Comment


            • #7
              you got help , you just did not use it

              $headers .= "Wrom: SKPNKMBIPB


              needs at least "; at the end to stop the parse error & better still \n"; to make the mail actully work.

              we can only help to a point , you need to look at your code and others and try and see what errors could be occurring.

              a good way to debug is to comment out bits of your code until the errors go away , then you can see which part is causing the error.
              resistance is...

              MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

              Comment

              Working...
              X