#1
  1. No Profile Picture
    tigertim
    Guest
    Devshed Newbie (0 - 499 posts)
    I am using this code and when I access the url where it is, I get a save as dialogue box why?

    <html>

    <body>

    <?php

    if ($submit) {

    // process form

    $db = mysql_connect("localhost", "root","password");

    mysql_select_db("mydb",$db);

    $sql = "INSERT INTO test (first,last,address,position) VALUES ('$first','$last','$address','$position')";

    $result = mysql_query($sql);

    echo "Thank you! Information entered.n";

    } else{

    // display form

    ?>

    <form method="post" action="<?php echo $PHP_SELF?>">

    First name:<input type="Text" name="first"><br>
    Last name:<input type="Text" name="last"><br>
    Address:<input type="Text" name="address"><br>
    Position:<input type="Text" name="position"><br>
    <input type="Submit" name="submit" value="Enter information">

    </form>

    <?php

    } // end if

    ?>

    </body>

    </html>

  2. #2
  3. No Profile Picture
    cwbigham
    Guest
    Devshed Newbie (0 - 499 posts)
    When this happened to me, I was getting a file named "test.php3" when the Web server was set up to process *.php through the PHP interpreter. When I changed the file name to "test.php" everything worked fine.

    You should check the configuration of your Web to be sure the file extension you are using for your file is one that will be sent to the PHP processor.

Similar Threads

  1. Access: list box/combo box "After Update" problems
    By hlove in forum Database Management
    Replies: 2
    Last Post: January 2nd, 2004, 01:22 AM
  2. Java Print - without dialogue box
    By Phazula in forum HTML Programming
    Replies: 0
    Last Post: December 12th, 2003, 03:37 AM
  3. simulating save as dialogue box!
    By Deepali in forum ASP Programming
    Replies: 1
    Last Post: November 9th, 2003, 10:51 PM
  4. changing the buttons in the message box
    By crackerweb in forum Visual Basic Programming
    Replies: 6
    Last Post: October 23rd, 2003, 06:36 PM
  5. Save As dialogue box to download images
    By mooliMooli in forum HTML Programming
    Replies: 0
    Last Post: October 14th, 2003, 05:16 PM

IMN logo majestic logo threadwatch logo seochat tools logo