ShadwSrch Posted April 17, 2009 Share Posted April 17, 2009 I am new to .php... I have a form that I am using (really just experimenting with)... <form method="post" action="updatedatabase.php" /> ...some text boxes <input type="sumit" value="Submit" /> The updatedatabase.php file is layed out like this: <?php some code ?> I don't have any other elements in it. When I click the submit button, IE tries to download updatedatabase.php. I copied the code from a tutorial somewhere, but I can't seem to remember where I got it...I can post the code if needed, but I didn't think it was relevant to the behavior... Any Ideas why this is happening? Link to comment https://forums.phpfreaks.com/topic/154569-ie-trying-to-download-php-file/ Share on other sites More sharing options...
ToonMariner Posted April 17, 2009 Share Posted April 17, 2009 your aint set up to run php - either its not installed or your server is not configured correctly. Link to comment https://forums.phpfreaks.com/topic/154569-ie-trying-to-download-php-file/#findComment-812777 Share on other sites More sharing options...
ShadwSrch Posted April 17, 2009 Author Share Posted April 17, 2009 The file with the code in it is a .php file.... No php in it, though...just html Link to comment https://forums.phpfreaks.com/topic/154569-ie-trying-to-download-php-file/#findComment-812782 Share on other sites More sharing options...
schilly Posted April 17, 2009 Share Posted April 17, 2009 put <?php php_info(); ?> in a php file and see if it runs. it not then php is either not installed or not configured on your web server. Link to comment https://forums.phpfreaks.com/topic/154569-ie-trying-to-download-php-file/#findComment-812794 Share on other sites More sharing options...
ShadwSrch Posted April 17, 2009 Author Share Posted April 17, 2009 It is on a server at work...I'm home now...I will check tomorrow...thanks for the help... Link to comment https://forums.phpfreaks.com/topic/154569-ie-trying-to-download-php-file/#findComment-812808 Share on other sites More sharing options...
jackpf Posted April 18, 2009 Share Posted April 18, 2009 Lol, always a good idea to install PHP before running any code. Link to comment https://forums.phpfreaks.com/topic/154569-ie-trying-to-download-php-file/#findComment-812844 Share on other sites More sharing options...
seaweed Posted April 18, 2009 Share Posted April 18, 2009 and it's always a good idea to install FireFox before browsing the web Link to comment https://forums.phpfreaks.com/topic/154569-ie-trying-to-download-php-file/#findComment-812916 Share on other sites More sharing options...
schilly Posted April 18, 2009 Share Posted April 18, 2009 and it's always a good idea to install FireFox before browsing the web haha how true Link to comment https://forums.phpfreaks.com/topic/154569-ie-trying-to-download-php-file/#findComment-812920 Share on other sites More sharing options...
keeB Posted April 18, 2009 Share Posted April 18, 2009 Ohhh browser wars. Link to comment https://forums.phpfreaks.com/topic/154569-ie-trying-to-download-php-file/#findComment-812922 Share on other sites More sharing options...
Daniel0 Posted April 18, 2009 Share Posted April 18, 2009 What's the mime code? IE doesn't support XHTML. Link to comment https://forums.phpfreaks.com/topic/154569-ie-trying-to-download-php-file/#findComment-813002 Share on other sites More sharing options...
jackpf Posted April 18, 2009 Share Posted April 18, 2009 and it's always a good idea to install FireFox before browsing the web Lol. Good one. Link to comment https://forums.phpfreaks.com/topic/154569-ie-trying-to-download-php-file/#findComment-813072 Share on other sites More sharing options...
ShadwSrch Posted April 18, 2009 Author Share Posted April 18, 2009 turns out the code is <?php phpinfo(); ?> ...and not "php_info" Mine returns the following: PHP Version 5.2.6-1+lenny2 followed by the rest... In case it helps, here are the 2 files: teamentry.php: <html> <head> <title>Update Database</title> </head> <body> <form method="post" action="updateteam.php"> <label for="txtName">Name:</label> <input type="text" size="25" name="Name" id="txtName"/> <br /> <label for="txtGrad">GradYear:</label> <input type="text" size="4" name="GradYear" id="txtGrad"/> <label for="txtTeam">Team:</label> <input type="text" size="4" name="Team" id="txtTeam"/> <br /> <input type="submit" value="Add Record"/> </form> <?php phpinfo(); ?> </body> </html> updateteam.php: <?php $Name = $_POST['Name']; $GradYear = $_POST['GradYear']; $Team = $_POST['Team']; mysql_connect("localhost","php","phpMySQ1") or die ('Error: ' . mysql_error()); mysql_select_db ("php_test"); $query="INSERT INTO teaminfo (id, name, grad, team) VALUES ('NULL','".$Name."', '".$GradYear."', '".$Team."')"; mysql_query($query) or die ('Error updating database'); echo "Database Updated With: " .$Name. " ," . $GradYear; ?> any other ideas? Link to comment https://forums.phpfreaks.com/topic/154569-ie-trying-to-download-php-file/#findComment-813475 Share on other sites More sharing options...
ShadwSrch Posted April 19, 2009 Author Share Posted April 19, 2009 Alright...after adding the phpinfo() to the file...and accessing with Firefox, it now works on both Firefox and IE... I guess it is good that I don't have the problem anymore, but I wish I knew what the problem was... Thanks for your time. Link to comment https://forums.phpfreaks.com/topic/154569-ie-trying-to-download-php-file/#findComment-813477 Share on other sites More sharing options...
jackpf Posted April 19, 2009 Share Posted April 19, 2009 It's probably nothing to do with you - just IE having a spasm or something. Link to comment https://forums.phpfreaks.com/topic/154569-ie-trying-to-download-php-file/#findComment-813487 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.