Jump to content

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.....

[code]<head>
<title>Untitled Document</title>
</head>

<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>Funky</OPTION>
<OPTION>Electro</OPTION>
<OPTION>Progressive</OPTION>
<OPTION>Nu Skool</OPTION>
<OPTION>Old Skool(Florida)</OPTION>
</select>
<br />
<br />
<input type=submit value="OK" />
</form>
</body>
</html>
[/code]

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

[code]
<html>
<head>
<title>Untitled Document</title>
</head>

<body>
<?php
$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 = "";
$IP = $HTTP_SERVER_VARS["HTTP_X_FORWARDED_FOR"];
//  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



?>
</body>
</html>
[/code]
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.
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.