just-j Posted July 9, 2006 Share Posted July 9, 2006 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 MySQLmysql_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] Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted July 9, 2006 Share Posted July 9, 2006 If its asking you to download the file then either your host hasn't installed PHP or your hosts server is misconfigured. Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted July 9, 2006 Share Posted July 9, 2006 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. Quote Link to comment Share on other sites More sharing options...
just-j Posted July 10, 2006 Author Share Posted July 10, 2006 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... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.