hybmg57 Posted November 5, 2010 Share Posted November 5, 2010 I have a website that PHP is not showing. http://www.beautifulhawaiihomes.com/extras/registration.php Please have a look I'm not sure if it's something to do with PHP.ini username: jae password: 1234 Thank you. Kind regards, Jae Link to comment https://forums.phpfreaks.com/topic/217827-php-website-not-showing/ Share on other sites More sharing options...
trq Posted November 5, 2010 Share Posted November 5, 2010 Considering php executes server side your link is of absolutely no use. Have you tried viewing a simple phpinfo script? What have you tried? A simple "doesn't work' will get you knowhere, we need information. Link to comment https://forums.phpfreaks.com/topic/217827-php-website-not-showing/#findComment-1130656 Share on other sites More sharing options...
hybmg57 Posted November 6, 2010 Author Share Posted November 6, 2010 Hi, I have done phpinfo() please have a look at the site again. Thank you. Jae Link to comment https://forums.phpfreaks.com/topic/217827-php-website-not-showing/#findComment-1130932 Share on other sites More sharing options...
Pikachu2000 Posted November 6, 2010 Share Posted November 6, 2010 So now that we know PHP is running on the server, post the script you're having trouble with. Link to comment https://forums.phpfreaks.com/topic/217827-php-website-not-showing/#findComment-1130936 Share on other sites More sharing options...
hybmg57 Posted November 6, 2010 Author Share Posted November 6, 2010 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <script src="SpryAssets/SpryValidationPassword.js" type="text/javascript"></script> <script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script> <link href="SpryAssets/SpryValidationPassword.css" rel="stylesheet" type="text/css" /> <link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" /> </head> <?php phpinfo(); include('db.php'); include('functions.php'); if(isset($_POST['Submit'])){ $user = strval(trim(mysql_prep($_POST['user']))); $search = mysql_query("SELECT user FROM hawaii_mls.users WHERE user = '{$user}'"); if(mysql_num_rows($search) == 1){ echo "User already registered"; ?> <body> <form id="registration" name="registration" method="post" action=<?php echo $_SERVER['PHP_SELF']; ?>> <table width="200" border="1"> <tr> <td><label for="user">User: </label></td> <td><span id="sprytextfield1"><input type="text" name="user" id="user" /><span class="textfieldRequiredMsg">A value is required.</span></span></td> </tr> <tr> <td><label for="password">Password: </label></td> <td><span id="sprypassword1"><input type="password" name="password" id="password" /> <span class="passwordRequiredMsg">A value is required.</span></span></td> </tr> <tr> <td><label for="email">Email: </label></td> <td><span id="sprytextfield2"> <input type="text" name="email" id="email" /> <span class="textfieldRequiredMsg">A value is required.</span></span></td> </tr> <tr> <td> </td> <td><input name="Submit" type="submit" value="Submit" /></td> </tr> </table> </form> <script type="text/javascript"> var sprypassword1 = new Spry.Widget.ValidationPassword("sprypassword1"); var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1"); var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2"); </script> </body> <?php } else { mysql_query("INSERT INTO hawaii_mls.users ( user , password , email ) VALUES ( '{$_POST['user']}', '{$_POST['password']}', '{$_POST['email']}' ); ") or die(mysql_error()); echo "User registration complete!"; } } ?> </html> This is the code for the entire page. Please have a look. Thank you. Kind regards, Jae Link to comment https://forums.phpfreaks.com/topic/217827-php-website-not-showing/#findComment-1130974 Share on other sites More sharing options...
Pikachu2000 Posted November 6, 2010 Share Posted November 6, 2010 You have the majority of your html inside both the if( isset($_POST['Submit']) ) and if(mysql_num_rows($search) == 1) conditional statements. So by that logic, the form won't display unless it has been submitted . . . Link to comment https://forums.phpfreaks.com/topic/217827-php-website-not-showing/#findComment-1131035 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.