Jump to content


This topic is now archived and is closed to further replies.


html form submit want to download .php file but not supose to

Recommended Posts

ok i made a form and when i click the submit button, the download box comes up with the .php file that i want it to go to..  i dont want to download the .php file  what the mess did i do wrong?  here is the html code.....

<title>Untitled Document</title>

<body bgcolor="#000000" text="#FFFFFF">
<form action="signup.php" method="post">
  Enter your DJ/Producer name max 15 characters
    <input name="user" type="text" maxlength="15" />
<br />Enter Password.  Max 10 characters   
    <input name="passwd" type="password" maxlength="10" />
<br />Enter Email.  Used for varification
  <input name="email" type="text" />
<br />What Country are you living in?
  <input type="text" name="country" />
<br />What State are you living in?
  <input type="text" name="state" />
<br />Tell everyone a little about your self:
  <input type="text" name="bio" />
<br />What are you musical interests/influences?
  <input type="text" name="music" />
<br />Select your breaks genre of choice
<select name="genre" size="1">
<OPTION>Old Skool(Florida)</OPTION>
<br />
<br />
<input type=submit value="OK" />

and this is what i have in the .php  but i dont think that it matters much with the problem....

<title>Untitled Document</title>

$name = $_POST['user'];
$passwd = $_POST['passwd'];
$email = $_POST['email'];
$country = $_POST['country'];
$state = $_POST['state'];
$bio = $_POST['bio'];
$music = $_POST['music'];
$genre = $_POST['genre'];
$Server = "localhost";
$Username = "root";
$Pass = "";
//  connect PHP to MySQL
mysql_connect ($Server, $Username, $Pass) or die ("Connection Denied");
mysql_select_db("tbbc") or die ("Unavaliable DB");
// checkin for dupe account. if not found then add user to table
$result = mysql_query("SELECT user FROM users where user='$name'");
$row = mysql_fetch_array( $result );
$row = $row['user'];
if ($row == NULL) {
  mysql_query("INSERT INTO users
(user, password, bio, email, city, country, music, genre, ip) VALUES('$name', '$passwd', '$bio', '$email', '$city', '$country', '$music', '$genre', '$ip' ) ")
or die(mysql_error());
} else { echo "That login is already taken.  Please choose another login name"; }
//end check


Share this post

Link to post
Share on other sites
If its asking you to download the file then either your host hasn't installed PHP or your hosts server is misconfigured.

Share this post

Link to post
Share on other sites
Actually, it can be a client problem too. I have tried on my localhost that an application worked in Firefox and not in Internet Explorer, it was just an application for myself, so I did bother to fix it. It's just because the entire Internet Explorer is broken.

Share this post

Link to post
Share on other sites
i dont know what the deal is..  i tried other php scripts <?php phpinfo(); ?> and still asking where i want to download..  im going to start a thread in the php forums...

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.