Jump to content


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

  • Please log in to reply
3 replies to this topic

#1 just-j

  • Members
  • PipPipPip
  • Advanced Member
  • 52 posts

Posted 09 July 2006 - 02:52 PM

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


#2 wildteen88

  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 09 July 2006 - 03:53 PM

If its asking you to download the file then either your host hasn't installed PHP or your hosts server is misconfigured.

#3 Daniel0

  • Staff Alumni
  • Advanced Member
  • 11,956 posts

Posted 09 July 2006 - 06:53 PM

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.

#4 just-j

  • Members
  • PipPipPip
  • Advanced Member
  • 52 posts

Posted 10 July 2006 - 01:26 PM

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

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users