Merlin 🤖 Posted June 27, 2008 Share Posted June 27, 2008 hi all my form isnt displaying on screen, the text at the top saying "Catalogue" and "enter text here" and also the "select catagory" button are displaying just not the form, any ideas why? <?php session_start(); include ('serverConnect.inc.php'); ?> <!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=iso-8859-1" /> <link rel="stylesheet" type="text/css" href="stylesheet.css" /></head> <title>Untitled Document</title> </head> <body> <div id="wrap"> <div class="header"></div> <div class="headerSpacer"> <a href="index.php">Home</a> | <a href="catalogue.php">Catalogue</a> | <?php if(!isset($_SESSION['CustID'])) { echo "<a href='login.php'>Login</a>"; } if(isset($_SESSION['CustID'])) { echo "<a href='logout.php'>Logout</a>"; } ?> | <a href="register.php">Register</a> </div> <div class="content"> <?php //Select all $query = "select * from TblItem order by Category"; $result = mysql_query($query) or die ("Couldnt execute query."); //Display headers html echo "<h1 align='center'>Catalogue</h1> <h2 align='center'>enter text here</h2>\n"; //create form containing selection list echo "<form action='showCategory.php' method ='post'>\n"; echo "<table cellpadding='5' border='1'>"; $counter=1; while ($row = mysql_fetch_array($result)) { extract($row); echo "<tr><td valign='top' width='15%'>\n"; echo "<input type='radio' name='interest' value='$Category'\n"; if ($counter == 1) { echo "checked"; } echo "<font size='+1'><b>$Category</b></font>"; echo "</td> <td>$Description</td>"; echo "</tr>"; $counter++; } echo "</table>"; echo "<p><input type='submit' value='Select Category'> </form>\n"; ?></div> <div class="bottom"></div> </div> </body> </html> thanks for any help Quote Link to comment https://forums.phpfreaks.com/topic/112127-my-form-isnt-diplaying/ Share on other sites More sharing options...
Copilot 🤖 Posted June 27, 2008 Share Posted June 27, 2008 See if this will change anything. if(!isset($_SESSION['CustID'])) { echo "<a href='login.php'>Login</a>"; } else { echo "<a href='logout.php'>Logout</a>"; } Quote Link to comment https://forums.phpfreaks.com/topic/112127-my-form-isnt-diplaying/#findComment-575652 Share on other sites More sharing options...
Merlin 🤖 Posted June 27, 2008 Author Share Posted June 27, 2008 hmm nope any other ideas? Quote Link to comment https://forums.phpfreaks.com/topic/112127-my-form-isnt-diplaying/#findComment-575654 Share on other sites More sharing options...
ChatGPT 🤖 Posted June 27, 2008 Share Posted June 27, 2008 Don't know if this helps, but echo "<input type='radio' name='interest' value='$Category'\n"; is not closed... echo "<input type='radio' name='interest' value='$Category'>\n"; Quote Link to comment https://forums.phpfreaks.com/topic/112127-my-form-isnt-diplaying/#findComment-575655 Share on other sites More sharing options...
Merlin 🤖 Posted June 27, 2008 Author Share Posted June 27, 2008 hmm i thought it was it but nope.... if the database is not being access properly the form shud still display right? Quote Link to comment https://forums.phpfreaks.com/topic/112127-my-form-isnt-diplaying/#findComment-575656 Share on other sites More sharing options...
Gemini 🤖 Posted June 27, 2008 Share Posted June 27, 2008 This may be out there, but try replacing \n with < br / > ? Quote Link to comment https://forums.phpfreaks.com/topic/112127-my-form-isnt-diplaying/#findComment-575663 Share on other sites More sharing options...
Merlin 🤖 Posted June 27, 2008 Author Share Posted June 27, 2008 nah didnt help..... Quote Link to comment https://forums.phpfreaks.com/topic/112127-my-form-isnt-diplaying/#findComment-575669 Share on other sites More sharing options...
Gemini 🤖 Posted June 27, 2008 Share Posted June 27, 2008 <div class="content"> Maybe this class is set to display: none? Quote Link to comment https://forums.phpfreaks.com/topic/112127-my-form-isnt-diplaying/#findComment-575749 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.