SitePoint Sponsor

User Tag List

Page 3 of 4 FirstFirst 1234 LastLast
Results 51 to 75 of 91
  1. #51
    SitePoint Wizard
    Join Date
    Dec 2005
    Posts
    1,727
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    like i shown before the browser dosent show any code besides | thats with die() inside the header brace

    ive tryed it outside of the header brace:

    PHP Code:
    print("|");
    die(); {  
            
    header('Location: index1.php');
            exit();
        }
        else {print(
    'There was a problem sending the mail. Please check that you filled in the form correctly.');} // line 21

    error:
    Code:
    <br />
    <b>Parse error</b>:  syntax error, unexpected T_ELSE in <b>/home/public_html/contact.php</b> on line <b>21</b><br />
    thanks is this making sense now? cheers

  2. #52
    SitePoint Addict miggl's Avatar
    Join Date
    Feb 2007
    Location
    Los Angeles, CA
    Posts
    286
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes! Thanks, that laid out the problem. See if this fixes the issue:
    PHP Code:
    <?php
    //this at the very top of the page
    session_start();

    include (
    'process.php');

    $s_error_message verify();
    if (
    strlen($s_error_message) > 0) {print($s_error_message);}
    else
    {
        
    $to="email@site.com";
        
    $message $name ' just filled in your contact form. They said:\n' $comments '\n\nTheir e-mail address was: ' $email;
        
    $subject ucfirst($category);
                
        if (
    mail($to$subject$message'From: ' $email)) {header('Location: index1.php');}
        else {print(
    'There was a problem sending the mail. Please check that you filled in the form correctly.');}
    }

    ?> 

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <title>mysite.com</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

    <link href="structure1.css" rel="stylesheet" type="text/css">
    <link href="appearance1.css" rel="stylesheet" type="text/css">

    </head>
    <body>
    <br><br>

    <div id="wrapper">
    <img src="images/logo.gif">
    <div id="banner">
      <h1>&nbsp;</h1>
    </div>

    <div id="l">
        <?php include ('includes/navigation.inc.html'); ?>
    </div>

    <div id="m">
        <p>&nbsp;</p>
        <h1>site<br>
        <span class="grey">contact</span></h1>
        <h1>&nbsp;</h1>
        <div id="leftlist">
        <h2>Please fill in all the text fields, if you don'tleave your name or a valid email no information can reach us.</h2>
        <p>&nbsp;</p>
        <p>kind regards</p>
        </div>
        <div id="rightlist">
        <?php print($s_error_message);?> 
        <form name="contact" method="post" action="<?php $_POST['PHP-SELF'];?>">  
        <h1><input name="name" type="text" id="name" value="<?php print($name); ?>"> Name</h1>  
        <p>&nbsp; </p>  
        <h1><input name="email" type="text" id="email" value="<?php print($email); ?>">Email</h1>  
        <p>&nbsp;</p>  
        <p><select name="category" id="category">  
            <option value="">Please Select</option>  
        <?php
        
    if ($category == 'enquires') {$s_selected " selected='selected'";}  
        else {
    $s_selected '';}  
        
    ?>  
              <option value="enquires"<?php print($s_selected); ?>>Enquries</option>  
        <?php
        
    if ($category == 'clubs') {$s_selected " selected='selected'";}  
        else {
    $s_selected '';}  
        
    ?>  
              <option value="clubs"<?php print($s_selected); ?>>Clubs</option>  
        <?php
        
    if ($category == 'pictures') {$s_selected " selected='selected'";}  
        else {
    $s_selected '';}  
        
    ?>  
            <option value="pictures"<?php print($s_selected); ?>>Pictures</option>  
        <?php
        
    if ($category == 'advertise') {$s_selected " selected='selected'";}  
        else {
    $s_selected '';}  
        
    ?>  
            <option value="advertise"<?php print($s_selected); ?>>Advertise</option>  
        <?php
        
    if ($category == 'other') {$s_selected " selected='selected'";}  
        else {
    $s_selected '';}  
        
    ?>  
            <option value="other"<?php print($s_selected); ?>>Other</option>  
        </select></p>  
        <p>&nbsp;</p>  
        <p><textarea name="comment" id="comment"><?php print($comments); ?></textarea></p>  
        <p>&nbsp;</p>  
        <p><input type="submit" name="submit" value="Submit"></p>  

        </form>
        
        </div><!-- End #rightlist -->
        
    </div><!-- End #m -->

    <div id="r">
      
    <?php include ('includes/sub_navigation.inc.html'); ?>

    </div><!-- End #r -->
    <?php include ('includes/footer.inc.html'); ?>
    </div><!-- End #wrapper -->

    </body>
    </html>
    Celebrate Liberty, Freedom, and Rights at The Constitutionalist.

  3. #53
    SitePoint Wizard
    Join Date
    Dec 2005
    Posts
    1,727
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the page is showing now and puts this error at the very top of the page

    Warning: Cannot modify header information - headers already sent by (output started at /home/public_html/process.php:28) in /home/public_html/contact.php on line 15

    Thanks just posted a new thread but deleted it now thought you wasn't coming back.

    THANKS

    it gives this above the html tag in the browser:

    Code:
    <br />
    <b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /home/public_html/process.php:28) in <b>/home/public_html/contact.php</b> on line <b>15</b><br />
    PHP Code:
    if (mail($to$subject$message'From: ' $email)) {header('Location: index1.php');} 
    // line 15

    28 is the same as last time ?> on the process.php

    Ive just tryed to submit aswell even though the error is still there and when i submit the error goes at the top of the page and gets replaced with the form errors. It also shows the form errors again above the form. so its showing the form errors twice.

  4. #54
    SitePoint Addict miggl's Avatar
    Join Date
    Feb 2007
    Location
    Los Angeles, CA
    Posts
    286
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Let me get back to you on this. I'll take this away and work on it at home as soon as I get there. Give me a couple of hours.
    Celebrate Liberty, Freedom, and Rights at The Constitutionalist.

  5. #55
    SitePoint Wizard
    Join Date
    Dec 2005
    Posts
    1,727
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok defo coming back tho ive deleted another post hoping you'd solve it.

    Thanks! 2 nights now lol..

  6. #56
    SitePoint Addict miggl's Avatar
    Join Date
    Feb 2007
    Location
    Los Angeles, CA
    Posts
    286
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up

    Ok, I have it up and running now (I actually tested the code, imagine that!) hehe

    Here's what was wrong: there was a space as the last character of the process.php file. You need to make sure there is no trailing space outside of the PHP escape tags.

    I also took the liberty of making more revisions. Here are the files:

    main page:
    PHP Code:
    <?php
    session_start
    ();

    require_once(
    'process.php');

    $s_error_message verify();
    if (
    strlen($s_error_message) == 0)
    {
        
    $to="email@site.com";
        
    $message $name ' just filled in your contact form. They said:\n' $comments '\n\nTheir e-mail address was: ' $email;
        
    $subject ucfirst($category);
                
        if (
    mail($to$subject$message'From: ' $email)) {header('Location: index1.php');}
        else {print(
    'There was a problem sending the mail. Please check that you filled in the form correctly.');}
    }
    ?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
        <head>
            <title>mysite.com</title>
            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
            <link href="structure1.css" rel="stylesheet" type="text/css">
            <link href="appearance1.css" rel="stylesheet" type="text/css">
        </head>
        <body>
            <br />
            <br />
            <div id="wrapper">
                <img src="images/logo.gif">
                <div id="banner">
                    <h1>&nbsp;</h1>
                </div>
                <div id="l">
    <?php
        
    include ('includes/navigation.inc.html');
    ?>
                </div>
                <div id="m">
                    <p>&nbsp;</p>
                    <h1>
                        site<br />
                        <span class="grey">contact</span>
                    </h1>
                    <h1>&nbsp;</h1>
                    <div id="leftlist">
                        <h2>Please fill in all the text fields, if you don'tleave your name or a valid email no information can reach us.</h2>
                        <p>&nbsp;</p>
                        <p>kind regards</p>
                    </div>
                    <div id="rightlist">
    <?php
        
    if (strlen($s_error_message) > 0) {print($s_error_message);}
    ?>
                        <form name="contact" method="post" action="">
                            <table>
                                <tr>
                                    <td>Name:</td>
                                    <td><input name="name" type="text" id="name" value="<?php print($name); ?>" /></td>
                                </tr>
                                <tr>
                                    <td>Email:</td>
                                    <td><input name="email" type="text" id="email" value="<?php print($email); ?>" /></td>
                                </tr>
                                <tr>
                                    <td>Category:</td>
                                    <td>
                                        <select name="category" id="category">
                                            <option value="">Please Select</option>
    <?php
    if ($category == 'enquires') {$s_selected " selected='selected'";}  
    else {
    $s_selected '';}  
    ?>
                                            <option value="enquires"<?php print($s_selected); ?>>Enquries</option>
    <?php
    if ($category == 'clubs') {$s_selected " selected='selected'";}  
    else {
    $s_selected '';}  
    ?>
                                            <option value="clubs"<?php print($s_selected); ?>>Clubs</option>
    <?php
    if ($category == 'pictures') {$s_selected " selected='selected'";}  
    else {
    $s_selected '';}  
    ?>
                                            <option value="pictures"<?php print($s_selected); ?>>Pictures</option>
    <?php
    if ($category == 'advertise') {$s_selected " selected='selected'";}  
    else {
    $s_selected '';}  
    ?>
                                            <option value="advertise"<?php print($s_selected); ?>>Advertise</option>
    <?php
    if ($category == 'other') {$s_selected " selected='selected'";}  
    else {
    $s_selected '';}  
    ?>
                                            <option value="other"<?php print($s_selected); ?>>Other</option>
                                        </select>
                                    </td>
                                </tr>
                                <tr>
                                    <td>Comments:</td>
                                    <td><textarea name="comment" id="comment"><?php print($comments); ?></textarea></td>
                                </tr>
                                <tr>
                                    <td colspan="2"><input type="submit" name="submit" value="Submit" /></td>
                                </tr>
                            </table>
                        </form>
                    </div>
                </div>
                <div id="r">
    <?php
        
    include('includes/sub_navigation.inc.html');
    ?>
                </div>
    <?php
        
    include ('includes/footer.inc.html');
    ?>
            </div>
        </body>
    </html>









    <?php
    session_start
    ();

    include (
    'process.php');

    ?> 
    <html>
        <head>
            <title>Test Page</title>
        </head>
        <body>
        </body>
    </html>
    process.php:
    PHP Code:
    <?php
    $name                
    '';
    $email                '';
    $category            '';
    $comments            '';
    $s_error_message    '';

    function 
    verify()
    {
        if (isset(
    $_POST['submit'])) //check for name of your submit button
        
    {
            if (
    $_POST['submit'] == 'Submit')
            {
                if (isset(
    $_POST['name'])) {$name trim(stripslashes($_POST['name']));}
                if (isset(
    $_POST['email'])) {$email trim(stripslashes($_POST['email']));}
                if (isset(
    $_POST['category'])) {$category trim(stripslashes($_POST['category']));}
                if (isset(
    $_POST['comment'])) {$comments trim(stripslashes($_POST['comment']));}
                if (
    strlen($name) == 0) {$s_error_message .= '<p>You forgot to enter your name!</p>';}
                if (
    strlen($category) == 0) {$s_error_message .= '<p>Please select a category!</p>';}
                if (
    strlen($comments) == 0) {$s_error_message .= '<p>You forgot your comments!</p>';}
                if (
    strlen($email) == 0) {$s_error_message .= "<p>You forgot your email address!</p>";}
                elseif(!
    eregi("^[[:alnum:]][a-z0-9_.-]*@[a-z0-9.-]+\.[a-z]{2,4}$"$email)) {$s_error_message .= "<p>Not a valid email address</p>";}
            }  
        }
    }
    ?>
    Celebrate Liberty, Freedom, and Rights at The Constitutionalist.

  7. #57
    SitePoint Wizard
    Join Date
    Dec 2005
    Posts
    1,727
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks miggl but doesn’t seem to of got any better. I’ve changed the above code and now i cant even view the page.

    If i delete the trial space after the ?> process.php when i try and open contact.php it just stays on the index page as if the link doesn’t exist, but if i put the space back after ?> the page opens but with that same error and i cant submit anything???

    UPDATE:
    Ive just changed the header to a diffrent page than index1.php, so now when i click the contact.php it goes to the new header address, instead of opening contact.php??? this is with out the trail space.

  8. #58
    SitePoint Addict miggl's Avatar
    Join Date
    Feb 2007
    Location
    Los Angeles, CA
    Posts
    286
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have it up and running here: http://www.emmgee.com/sandbox/form.php. Let me know if thats how it should work. If so, I'll zip up the files and send them to you.
    Celebrate Liberty, Freedom, and Rights at The Constitutionalist.

  9. #59
    SitePoint Wizard
    Join Date
    Dec 2005
    Posts
    1,727
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    just tryed the link it defaults to the index1,php doing what mine is doing

    thanks

  10. #60
    Always learning kigoobe's Avatar
    Join Date
    May 2004
    Location
    Paris
    Posts
    1,565
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <b>Warning</b>: Cannot modify header information - headers already sent by (output started at /home/public_html/process.php:28) in <b>/home/public_html/contact.php</b> on line <b>15</b><br />
    Wow, 58 replies to this post. Impressive !!!

    In case you are still getting this above error, do the following -

    1. Check that there is nothing (including even empty spaces) before the first <?
    2. Add ob_start(); just after, like this -
    PHP Code:
    <?php
    ob_start
    ();
    3. Add ob_end_flush(); just before the ending (last) ?> of the page, like this
    PHP Code:
    ob_end_flush();
    ?> 
    4. Check that there is nothing, including even free space after that last ?>, to do that, place your cursor just after the ?> and hit the right arrow (->) of your keyboard. If the cursor moves to the right, come back where you were before, hit delete several times till you are sure that there is nothing left. Do the test, and repeat the step till you are sure there is nothing left.

    And Voila !!! Your problem is solved.

  11. #61
    Always learning kigoobe's Avatar
    Join Date
    May 2004
    Location
    Paris
    Posts
    1,565
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Mike, why you are showing your phpinfo to everyone?

  12. #62
    SitePoint Wizard
    Join Date
    Dec 2005
    Posts
    1,727
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for that it seems to open the page now but still showing that error, ive checked the spaces and nothing to fix???

    Thanks

  13. #63
    Always learning kigoobe's Avatar
    Join Date
    May 2004
    Location
    Paris
    Posts
    1,565
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Barry, are u speaking about the "Cannot modify header information" error? You should not get this error.

  14. #64
    SitePoint Wizard
    Join Date
    Dec 2005
    Posts
    1,727
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    kigoobe if you read what mike has put then read my problem it's the same his address has form.php and when you click the link it defaults to the header address index1.php. Thats what mine was doing until i added your bit of code above but now still showing that error but opening the page.

    Thanks

  15. #65
    SitePoint Wizard
    Join Date
    Dec 2005
    Posts
    1,727
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes! Cannot modify header information.

  16. #66
    Always learning kigoobe's Avatar
    Join Date
    May 2004
    Location
    Paris
    Posts
    1,565
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok, see there are three pages here, right? form.php, process.php and index1.php

    Can you please tell me in which page you are getting the error and in which page you have added that ob_start and ob_end_flush?

  17. #67
    SitePoint Addict miggl's Avatar
    Join Date
    Feb 2007
    Location
    Los Angeles, CA
    Posts
    286
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by kigoobe View Post
    Mike, why you are showing your phpinfo to everyone?
    I have no idea! Please slap me!!
    Celebrate Liberty, Freedom, and Rights at The Constitutionalist.

  18. #68
    SitePoint Wizard
    Join Date
    Dec 2005
    Posts
    1,727
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Right. Thanks in Advance.

    <?php
    ob_start(); // added to process.php
    contact.php // contact form with code & require_once('process.php'); in it
    index1.php // is just the page were you get directed after you submit the form

    making sense?

    Thanks

  19. #69
    SitePoint Addict miggl's Avatar
    Join Date
    Feb 2007
    Location
    Los Angeles, CA
    Posts
    286
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by computerbarry View Post
    Yes! Cannot modify header information.
    Barry, do you have the pages available on the web? Can you post a link to them? I'll bet anything there is an underlying error that is writing out to the page, causing the headers to fail.
    Celebrate Liberty, Freedom, and Rights at The Constitutionalist.

  20. #70
    Always learning kigoobe's Avatar
    Join Date
    May 2004
    Location
    Paris
    Posts
    1,565
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by miggl View Post
    I have no idea! Please slap me!!
    It's still there ...

  21. #71
    Always learning kigoobe's Avatar
    Join Date
    May 2004
    Location
    Paris
    Posts
    1,565
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well, redirection thro' header is getting called from contact.php, right?

    Follow the same thing for this file as well.

  22. #72
    SitePoint Wizard
    Join Date
    Dec 2005
    Posts
    1,727
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry i cant give the link this time, the problem lies in the code your having the same problem now yourself all the code is in this thread.

    thanks

  23. #73
    SitePoint Wizard
    Join Date
    Dec 2005
    Posts
    1,727
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    {header('Location: index1.php');} // line 13 
    // this is whats causing the problem I think. yes contact.php

    what do you mean "Follow the same thing for this file as well."

    thanks

  24. #74
    Always learning kigoobe's Avatar
    Join Date
    May 2004
    Location
    Paris
    Posts
    1,565
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I mean, what I have adviced you in my first post, about ob_start() and ob_end_flush(), also about <? and ?>, follow this for the page contact.php

    You may have to remove this part
    Code:
    <html> 
        <head> 
            <title>Test Page</title> 
        </head> 
        <body> 
        </body> 
    </html>
    for that, you can remove them, and see that there is no extra space left after the ending ?>

  25. #75
    SitePoint Addict miggl's Avatar
    Join Date
    Feb 2007
    Location
    Los Angeles, CA
    Posts
    286
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I looked the code over again, and in my rush last night overlooked a few mistakes. Here it is:
    process.php:
    PHP Code:
    <?php
    function verify()
    {
        
    $name                '';
        
    $email                '';
        
    $category            '';
        
    $comments            '';
        
    $s_error_message    '';

        if (isset(
    $_POST['submit'])) //check for name of your submit button
        
    {
            if (isset(
    $_POST['name'])) {$name trim(stripslashes($_POST['name']));}
            if (isset(
    $_POST['email'])) {$email trim(stripslashes($_POST['email']));}
            if (isset(
    $_POST['category'])) {$category trim(stripslashes($_POST['category']));}
            if (isset(
    $_POST['comment'])) {$comments trim(stripslashes($_POST['comment']));}
            if (
    strlen($name) == 0) {$s_error_message .= '<p>You forgot to enter your name!</p>';}
            if (
    strlen($category) == 0) {$s_error_message .= '<p>Please select a category!</p>';}
            if (
    strlen($comments) == 0) {$s_error_message .= '<p>You forgot your comments!</p>';}
            if (
    strlen($email) == 0) {$s_error_message .= "<p>You forgot your email address!</p>";}
            elseif(!
    eregi("^[[:alnum:]][a-z0-9_.-]*@[a-z0-9.-]+\.[a-z]{2,4}$"$email)) {$s_error_message .= "<p>Not a valid email address</p>";}
        }

        return 
    $s_error_message;
    }
    ?>
    main page:
    PHP Code:
    <?php
    session_start
    ();

    require_once(
    'process.php');

    $s_error_message verify();
    if ((
    strlen($s_error_message) == 0)
        && (isset(
    $_POST['submit'])))
    {
        
    $to="email@site.com";
        
    $message $name ' just filled in your contact form. They said:\n' $comments '\n\nTheir e-mail address was: ' $email;
        
    $subject ucfirst($category);
                
        if (
    mail($to$subject$message'From: ' $email)) {header('Location: index1.php');}
        else {print(
    'There was a problem sending the mail. Please check that you filled in the form correctly.');}
    }
    ?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
        <head>
            <title>mysite.com</title>
            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
            <link href="structure1.css" rel="stylesheet" type="text/css">
            <link href="appearance1.css" rel="stylesheet" type="text/css">
        </head>
        <body>
            <br />
            <br />
            <div id="wrapper">
                <img src="images/logo.gif">
                <div id="banner">
                    <h1>&nbsp;</h1>
                </div>
                <div id="l">
    <?php
        
    include ('includes/navigation.inc.html');
    ?>
                </div>
                <div id="m">
                    <p>&nbsp;</p>
                    <h1>
                        site<br />
                        <span class="grey">contact</span>
                    </h1>
                    <h1>&nbsp;</h1>
                    <div id="leftlist">
                        <h2>Please fill in all the text fields, if you don'tleave your name or a valid email no information can reach us.</h2>
                        <p>&nbsp;</p>
                        <p>kind regards</p>
                    </div>
                    <div id="rightlist">
    <?php
        
    if (strlen($s_error_message) > 0) {print($s_error_message);}
    ?>
                        <form name="contact" method="post" action="form.php">
                            <table>
                                <tr>
                                    <td>Name:</td>
                                    <td><input name="name" type="text" id="name" value="<?php print($name); ?>" /></td>
                                </tr>
                                <tr>
                                    <td>Email:</td>
                                    <td><input name="email" type="text" id="email" value="<?php print($email); ?>" /></td>
                                </tr>
                                <tr>
                                    <td>Category:</td>
                                    <td>
                                        <select name="category" id="category">
                                            <option value="">Please Select</option>
    <?php
    if ($category == 'enquires') {$s_selected " selected='selected'";}  
    else {
    $s_selected '';}  
    ?>
                                            <option value="enquires"<?php print($s_selected); ?>>Enquries</option>
    <?php
    if ($category == 'clubs') {$s_selected " selected='selected'";}  
    else {
    $s_selected '';}  
    ?>
                                            <option value="clubs"<?php print($s_selected); ?>>Clubs</option>
    <?php
    if ($category == 'pictures') {$s_selected " selected='selected'";}  
    else {
    $s_selected '';}  
    ?>
                                            <option value="pictures"<?php print($s_selected); ?>>Pictures</option>
    <?php
    if ($category == 'advertise') {$s_selected " selected='selected'";}  
    else {
    $s_selected '';}  
    ?>
                                            <option value="advertise"<?php print($s_selected); ?>>Advertise</option>
    <?php
    if ($category == 'other') {$s_selected " selected='selected'";}  
    else {
    $s_selected '';}  
    ?>
                                            <option value="other"<?php print($s_selected); ?>>Other</option>
                                        </select>
                                    </td>
                                </tr>
                                <tr>
                                    <td>Comments:</td>
                                    <td><textarea name="comment" id="comment"><?php print($comments); ?></textarea></td>
                                </tr>
                                <tr>
                                    <td colspan="2"><input type="submit" name="submit" value="Submit" /></td>
                                </tr>
                            </table>
                        </form>
                    </div>
                </div>
                <div id="r">
    <?php
        
    include('includes/sub_navigation.inc.html');
    ?>
                </div>
    <?php
        
    include ('includes/footer.inc.html');
    ?>
            </div>
        </body>
    </html>
    I updated the code on my sandbox as well to reflect this: http://www.emmgee.com/sandbox/form.php
    Last edited by miggl; Mar 7, 2007 at 09:12.
    Celebrate Liberty, Freedom, and Rights at The Constitutionalist.


Bookmarks

Posting Permissions

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