PHP - Putting It All Together...displaying Array!
Thanks to the great help from some great people on this message board I'm right at the finish line on this page.
I'm trying to mesh all the coding together at this point, and make it display the information. I keep getting 'mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource....etc..(filename/location) on line 51. Am I way off here??? Code: [Select] <?php $db_host = 'localhost'; $db_user = 'root'; $db_pass = ''; $db_in = new MySQLi ( $db_host, $db_user, $db_pass, 'sign_in' ); $db_out = new MySQLi( $db_host, $db_user, $db_pass, 'sign_out' ); if( $db_in->connect_error || $db_out->connect_error ) trigger_error( 'Unable to initiate database connections', E_USER_ERROR ); $q_in = 'SELECT * FROM `customer sign-in`'; $q_out = 'SELECT * FROM `customer sign-out`'; if( ($r_in = $db_in->query($q_in)) === FALSE || ($r_out = $db_out->query($q_out)) === FALSE ) trigger_error( 'Unable to grab ticket information from databases', E_USER_ERROR ); $data_in = array(); $data_out = array(); while( $row = $r_in->fetch_assoc() ) $data_in[ $row['Ticket #'] ] = $row; $r_in->free(); while( $row = $r_out->fetch_assoc() ) $data_out[ $row['Ticket #'] ] = $row; $r_out->free(); $result = array_diff_key( $data_in, $data_out ); echo "<table border='1'> <tr> <th>ID</th> <th>Sign In Date</th> <th>RANK/CIV</th> <th>First Name</th> <th>Last Name</th> <th>Unit</th> <th>DSN/Roshan</th> <th>Classifications</th> <th>Services Requested</th> <th>Service Tag/ Serial Number</th> <th>Ticket #</th> <th>Make/ Model</th> </tr>"; while($row = mysql_fetch_assoc($result)) { // Retrieve data until no more { echo "<tr>"; echo "<td>" . $row['ID'] . "</td>"; echo "<td>" . $row['Sign in Date'] . "</td>"; echo "<td>" . $row['Rank/CIV'] . "</td>"; echo "<td>" . $row['First Name'] . "</td>"; echo "<td>" . $row['Last Name'] . "</td>"; echo "<td>" . $row['Unit'] . "</td>"; echo "<td>" . $row['DSN/Roshan'] . "</td>"; echo "<td>" . $row['Classifications'] . "</td>"; echo "<td>" . $row['Services Requested'] . "</td>"; echo "<td>" . $row['Service Tag/ Serial Number'] . "</td>"; echo "<td>" . $row['Ticket #'] . "</td>"; echo "<td>" . $row['Make/ Model'] . "</td>"; echo "</tr>"; } } ?> Similar TutorialsHi guys, I've got quite a few fields in my tables that i've serialised to keep the number of fields down. For everything else that works perfect as it stores the data and when needed I can use the following as an example: $dateofbirth = unserialize($row['dateofbirth']); $dobday = $dateofbirth[0]; $dobmonth = $dateofbirth[1]; $dobyear = $dateofbirth[2]; Date of birth is stored as dd,mm,yyyy and for everything else I can call it fine. My issue is now that i'm trying to use fputcsv to create a csv file using the following: $result = mysqli_query($con, 'SELECT u.user_id, b.dateofbirth FROM Users u INNER JOIN Basic b USING (user_id) ORDER BY user_id DESC'); $fp = fopen('latest.csv', 'w'); fputcsv($fp, array('User ID', 'DOB' )); The CSV generates, but for the date of birth column in the csv it outputs as "a:3:{i:0;s:2:"03";i:1;s:2:"02";i:2;s:4:"1986";}" because it's obviously still serialised. What is my best and or easiest way of handling these fields? Many thanks in advance. Edited by Kristoff1875, 21 January 2015 - 05:24 AM. Hi, I have an array key whose value is a line of html in quotes, the problem is , I don't know how to do it. Lol. Any help greatly appreciated because the below code is generating an error in my editor. Thank you. Derek here is the line. Code: [Select] 'level_1'=>"<img src='<img src='sundragon_environments/ocean/ocean1_FRAME.jpg'/>'", EDIT: actually I managed to fix the error adding a semicolon after the parenthesis. Is this array correct please? Code: [Select] $currentLocation = array ( 'teardrop_ocean_bg' => array ( 'level_1'=>"<img src='<img src='sundragon_environments/ocean/ocean1_FRAME.jpg'/>'" ) ); it's not finished yet. //First I'm assigning a $variable ($emailzipmatch) to query a database table called(repzipcodes) and having it pull and display 1 to 3 records based on matching up a customer's zip code (RepZipCode = $CustomerZipMatch) with 1 to 3 other people (GROUP BY RepId HAVING COUNT(1) <= 3") that want that customer's information from that particular zip code. <This code works fine> // CODE WORKS BELOW Code: [Select] <?php $emailzipmatch = mysql_query("SELECT * FROM repzipcodes WHERE RepZipCode = $CustomerZipMatch GROUP BY RepId HAVING COUNT(1) <= 3") or die(mysql_error()); $recipients = array(); while($row = mysql_fetch_array($emailzipmatch)) { $recipients[] = $row['RepEmail']; echo "Agent's Email Address: "; echo 'font color="#FF7600"',$row['RepEmail'], '/font'; echo '<br />'; echo "Rep's ID: "; echo '<br />'; echo 'font color="#FF7600"',$row['RepId'], '/font'; echo '<br />'; echo 'hr align="left" width="50%" size="2" /'; } //MY PROBLEM BELOW // For the NEXT step of the process above I would take $row['RepEmail'] and $row['RepId'] which can have 1 to 3 results and assign the 1 to 3 results a new $variable so it can be inserted into a different db table so I can track the results of the query ($emailzipmatch = ) from the top of the page: ie.. <New Variable> <Listed from above> $SentRepId 0 = RepId (results from above echo area) $SentRepId 1 = RepId (results from above echo area) $SentRepId 2 = RepId (results from above echo area) // Below I'd like to insert the above results into a new database $?Variable??? = mysql_query("INSERT INTO sentemail (SentRepId0, SentRepId1, SentRepId2,SentDateTime ) VALUES ( '$_SESSION[RepId]', // ????? '$_SESSION[RepId]', // ????? '$_SESSION[RepId]', // ????? NOW() )") or die(mysql_error()); Thank ahead of time for any help you guys can give me. Please respond with ANY question if my coding or request isn't clear or if I've been confusing due to my lack of experience with PHP and MySQL. MOD EDIT: code tags added. Well, the title pretty much says it all. I'm trying to extract data from an array, put it into a 2D array and then sort it. Then I need to put it's "place" in the order into the table. I've sort of got something so far but it seems like my while loop isn't working correctly. $q="SELECT COUNT(*), horseID, total FROM enteredHorses"; $r = mysqli_query ($dbc, $q) or trigger_error(mysqli_error($dbc)); while ($row = mysqli_fetch_array($r, MYSQLI_ASSOC)) { $count = $row['COUNT(*)']; $horse_id = $row['horseID']; $total = $row['total']; for ($counter = 1; $counter <= $count; $counter += 1) { $i = 0; $id[$i] = $horse_id; $total[$i] = $total; $i = $i+1; } } //end while array_multisort($total, SORT_DESC, $id); while ($row = mysqli_fetch_array($r, MYSQLI_ASSOC)) { for ($counter = 1; $counter <= $count; $counter += 1) { $i = 0; $place = '1'; $q = "INSERT INTO enteredHorses (place) VALUES ('$place') WHERE horse_id='$id[$i']'"; $r = mysqli_query ($dbc, $q) or trigger_error(mysqli_error($dbc)); $i = $i + 1; $place = $place + 1; } } I'm getting this error: "array_multisort() [function.array-multisort]: Argument #1 is expected to be an array or a sort flag " I'm really baffled. Any help? Hi all! Ok I am trying to put a delimited list like so , EX. item qty, item name, item price | item qty, item name, item price | item qty, item name, item price | etc. into an array so I can access it like this - $product[0] = qty, $product[1] = name, etc. My code just isnt working. This is what I have so far. $prod = array(); //breaking products text down for display $products1 = explode("|", $products); $num_prod1 = count($products1); $count = 0; foreach($products1 as $p) { $prod[] = $p; $products2 = explode(",", $p); foreach($products2 as $p2) { $prod[$count] = $prod[$count][$p2]; } $count++; } Hi Everyone, I have a problem displaying some information from an array (selected from my database). The array is below. Array ( [0] => Array ( [ssc_skill_categories] => Web [sc_skill_categories] => Programming ) [1] => Array ( [ssc_skill_categories] => Actionscript [sc_skill_categories] => Programming ) [2] => Array ( [ssc_skill_categories] => C# [sc_skill_categories] => Programming ) [3] => Array ( [ssc_skill_categories] => CSS [sc_skill_categories] => Programming ) [4] => Array ( [ssc_skill_categories] => Graphic [sc_skill_categories] => Designers ) [5] => Array ( [ssc_skill_categories] => Logo [sc_skill_categories] => Designers ) [6] => Array ( [ssc_skill_categories] => Illistration [sc_skill_categories] => Designers ) [7] => Array ( [ssc_skill_categories] => Animation [sc_skill_categories] => Designers ) ) What i would like to to is display this information in a table like so: <html> <body> <table> <tr> <td>Programming</td><td>Web</td><td>Actionscript</td><td>C#</td><td>CSS</td> <tr> <tr> <td>Designers</td><td>Graphic</td><td>Logo</td><td>Illistration</td><td>Animation</td> <tr> <table> </body> </html> I have been trying and failing all day to do this. Posting my "progress" will clog up the thread, so for now i wont post it. Does anyone have an idea how i would achieve this? Regards, -Ben Hi again all, Why does the foreach loop im doing, put the array values from collection, into seperate table rows rather than 1 row per whole array? <?php class registration{ public $fields = array("username", "email", "password"); public $data = array(); public $table = "users"; public $dateTime = ""; public $datePos = 0; public $dateEntryName = "date"; public $connection; function timeStamp(){ return($this->dateTime = date("Y-m-d H:i:s")); } function insertRow($collection){ //HERE foreach($this->fields as $row => $value){ mysql_query("INSERT INTO $this->table ($value) VALUES ('$collection[$row]')"); } mysql_close($this->connection->connectData); } function validateFields(){ $this->connection = new connection(); $this->connection->connect(); foreach($this->fields as $key => $value){ array_push($this->data, $_POST[$this->fields[$key]]); } $this->dateTime = $this->timeStamp(); array_unshift($this->data, $this->dateTime); array_unshift($this->fields, $this->dateEntryName); foreach($this->data as $value){ echo "$value"; } $this->insertRow($this->data); } } $registration = new registration(); $registration->validateFields(); ?> I end up with 3 rows row 1: username row 2: email row 3 : password rather than row 1:username email password. Hello everyone, Sorry if this has been answered but if it has I can't find it anywhere. So, from the begining then. Lets say I had a member table and in it I wanted to store what their top 3 interests are. Their$ row has all the usual things to identify them userID and password etc.. and I had a further 3 columns which were labled top3_1 top3_2 & top3_3 to put each of their interests in from a post form. If instead I wanted to store this data as a PHP Array instead (using 1 column instead of 3) is there a way to store it as readable data when you open the PHPmyadmin? At the moment all it says is array and when I call it back to the browser (say on a page where they could review and update their interests) it displays 'a' as top3_01 'r' as top3_02 and 'r' as top3_03 (in each putting what would be 'array' as it appears in the table if there were 5 results. Does anyone know what I mean? For example - If we had a form which collected the top 3 interests to put in a table called users, Code: [Select] <form action="back_to_same_page_for_processing.php" method="post" enctype="multipart/form-data"> <input name="top3_01" type="text" value="enter interest number 1 here" /> <input name="top3_02" type="text" value="enter interest number 2 here" /> <input name="top3_03" type="text" value="enter interest number 3 here" /> <input type="submit" name="update_button" value=" Save and Update! " /> </form> // If my quick code example for this form is not correct dont worry its not the point im getting at :) And they put 'bowling' in top3_01, 'running' in top3_02 and 'diving' in top3_03 and we catch that on the same page with some PHP at the top --> Code: [Select] if (isset($_POST)['update_button']) { $top3_01 = $_POST['top3_01']; // i.e, 'bowling' changing POST vars to local vars $top3_02 = $_POST['top3_02']; // i.e, 'running' $top3_03 = $_POST['top3_03']; // i.e, 'diving' With me so far? If I had a table which had 3 columns (1 for each interest) I could put something like - Code: [Select] include('connect_msql.php'); mysql_query("Select * FROM users WHERE id='$id' AND blah blah blah"); mysql_query("UPDATE users SET top3_01='$top3_01', top3_02='$top3_02', top3_03='$top3_03' WHERE id='$id'"); And hopefully if ive got it right, it will put them each in their own little column. Easy enough huh? But heres the thing, I want to put all these into an array to be stored in the 1 column (say called 'top3') and whats more have them clearly readable in PHPmyadmin and editable from there yet still be able to be called back an rendered on page when requested. Continuing the example then, assuming ive changed the table for the 'top3' column instead of individual colums, I could put something like this - Code: [Select] if (isset($_POST)['update_button']) { $top3_01 = $_POST['top3_01']; // i.e, 'bowling' changing POST vars to local vars $top3_02 = $_POST['top3_02']; // i.e, 'running' $top3_03 = $_POST['top3_03']; // i.e, 'diving' $top3_array = array($top3_01,$top3_02,$top3_03); include('connect_msql.php'); mysql_query("UPDATE members SET top3='$top3_array' WHERE id='$id' AND blah blah blah"); But it will appear in the column as 'Array' and when its called for using a query it will render the literal string. a r r in each field instead. Now I know you can use the 'serialize()' & 'unserialize()' funtcions but it makes the entry in the database practically unreadable. Is there a way to make it readable and editable without having to create a content management system? If so please let me know and I'll be your friend forever, lol, ok maybe not but I'd really appreciate the help anyways. The other thing is, If you can do this or something like it, how am I to add entries to that array to go back into the data base? I hope ive explained myself enough here, but if not say so and I'll have another go. Thanks very much people, L-PLate (P.s if I sort this out on my own ill post it all here) Hi I appreciate everyone who helped me with my other problem trying to call my Array() I had issues with. Heres what that looks like http://crafted.horizon-host.com/ff/ Code from the above Code: [Select] <html> <head> <title>FINAL FANTASY XIV - Item Database</title> <style type="text/css"> a:link {text-decoration: none; color: #FFFFFF} a:visited {text-decoration: none; color: #FFFFFF} a:hover {text-decoration: none; color: #FFFFFF} a:active {text-decoration: none; color: #FFFFFF} p.title { font-size: medium; font-family: Verdana; color: #FFFFFF; } p.items { font-size: small; font-family: Verdana; color: #FFFFFF; } </style> <script src="http://static.yg.com/js/exsyndication.js" type="text/javascript"> </script> <script type="text/javascript"> YG.UserSettings.Syndication = { removeClasses: ['extern'], defaultClass: 'yg-iconsmall yg-name', clearTitle: true } </script> </head> <body background="../images/testbg.jpg" marginwidth=60 marginheight=60> <table align="center" id="Table_01" width=520 height=393 border=0 cellpadding=0 cellspacing=0> <tr> <td width=520 height=14 colspan=5 background="../images/test_01.gif"></td> </tr> <tr> <td width=20 height=23 background="../images/test_02.gif"></td> <td colspan=3 background="../images/test_03.gif" align="center" valign="middle"> <p class='title'>FINAL FANTASY XIV - Item Database</p> </td> <td width=14 height=23 background="../images/test_04.gif"></td> </tr> <tr> <td width=520 height=7 colspan=5 background="../images/test_05.gif"></td> </tr> <tr> <td background="../images/test_06.gif"></td> <td colspan=3 background="../images/test_07.gif" align="center" valign="top"> <p class='items'> <?php function grabdata($site){ $page_contents = file_get_contents($site); $pattern = '/\/item\/([a-z,-]+[^gil])\?id\=([0-9,]+)/'; preg_match_all($pattern, $page_contents, $matches); $arrRetList = array(); if(!empty($matches)){ foreach($matches as $item) { foreach($item as $pos => $row){ $arrRetList[$pos][] = $row; } } foreach($arrRetList as $row){ echo "<p class='items'><a href='http://ffxiv.yg.com" . $row[0] . "'>Unknown Item</a> - " . $row[1] . " - " . $row[2] . "<BR>"; } } } grabdata("http://ffxiv.yg.com/items?l=50:50;trd=0;cl=30"); ?> </p> </td> <td background="../images/test_08.gif"></td> </tr> <tr> <td colspan=2 width=23 height=17 background="../images/test_09.gif"></td> <td background="../images/test_10.gif"></td> <td colspan=2 width=17 height=17 background="../images/test_11.gif"></td> </tr> <tr> <td> <img src="../images/spacer.gif" width=20 height=1></td> <td> <img src="../images/spacer.gif" width=3 height=1></td> <td> <img src="../images/spacer.gif" width=480 height=1></td> <td> <img src="../images/spacer.gif" width=3 height=1></td> <td> <img src="../images/spacer.gif" width=14 height=1></td> </tr> </table> </body> </html> Heres the code im trying to run, has some added stuff to the above <?php ?> code but its not viewing at all, just shows a white page.. and would like to get some advice on what im doing wrong Code: [Select] <?php function grabdata($site){ $page_contents = file_get_contents($site); $pattern = '/\/item\/([a-z,-]+[^gil])\?id\=([0-9,]+)/'; preg_match_all($pattern, $page_contents, $matches); $arrRetList = array(); if(!empty($matches)){ foreach($matches as $item) { foreach($item as $pos => $row){ $arrRetList[$pos][] = $row; } } foreach($arrRetList as $row){ echo $row[1] . " - " . $row[2] . "<BR>"; echo "<table align='center' border='0' cellpadding='0' cellspacing='0' width='80%'><td align='left'><p class='items'>Item</td><td align='center'><p class='items'>NPC Price</td><tr><td align='left'><p class='items'><a href='http://ffxiv.yg.com" . $row[0] . "'>Unknown Item</a></td></td><td align='center'><p class='items'>"; $page_contents2 = file_get_contents("http://ffxiv.yg.com" . $row[0] . ""); $matches2 = array(); preg_match_all('/<td class=\"lefttd\">Normal<\/td><td align=\"right\">([0-9,]+)<\/td><\/tr>/', $page_contents2, $matches2); if ($matches2[1][0] == ""){ echo "0g - "; } else { print_r($matches2[1][0] . "g - "); } preg_match_all('/<td class=\"lefttd\">\+1<\/td><td align=\"right\">([0-9,]+)<\/td><\/tr>/', $page_contents2, $matches2); if ($matches2[1][0] == ""){ echo "0g - "; } else { print_r($matches2[1][0] . "g - "); } preg_match_all('/<td class=\"lefttd\">\+2<\/td><td align=\"right\">([0-9,]+)<\/td><\/tr>/', $page_contents2, $matches2); if ($matches2[1][0] == ""){ echo "0g - "; } else { print_r($matches2[1][0] . "g - "); } preg_match_all('/<td class=\"lefttd\">\+3<\/td><td align=\"right\">([0-9,]+)<\/td><\/tr>/', $page_contents2, $matches2); if ($matches2[1][0] == ""){ echo "0g"; } else { print_r($matches2[1][0] . "g"); } echo "</td></tr>"; } echo "</table><BR><BR><BR>"; } } grabdata("http://ffxiv.yg.com/items?l=50:50;trd=0;cl=30"); ?> To give you a idea of what im looking for, it already grabs each item and list it from grabdata(""); function, i wanna take that further by it grabs the item, and then uses that data to grab the item sell price (normal, +1, +2, +3 quality) for each display it out, something like.. Code: [Select] ITEMNAME1 132g - 145g - 165g - 198g ITEMNAME2 50g - 0g - 0g - 0g ITEMNAME3 63g - 78g - 90g - 110g etc etc from the first $page_contents from $site $row[0] will output: item url variables $row[1] will output: item name $row[2] will output: item # from the second $page_contents from "http://ffxiv.yg.com" . $row[0] . "" $matches2[1][0] will be numerical output of the prices for each preg_match_all These scripts work separately just need them to work together Hey All.
I'm currently using the following code to source some information from a Mysql Database.
I've limited the results to 6 Values. I'm using the WHILE function to display a table with the results populated in.
As you'll see from the attached picture, the WHILE function is causing 5 tables to be created, each with 5 of the same image displayed. How do I go about displaying only 1 table with the 5 different pictures displayed in?
<?php $result = mysqli_query($con, "SELECT * FROM photo ORDER BY id DESC LIMIT 6"); while($row = mysqli_fetch_array($result)){ echo '<table> <tr><td class="left"> <a href="photo.php?id='.$row['id'].'"><img src="images/'.$row['id'].'.jpg" height="232" alt=""/></a> </td> <td class="center"> <a href="photo.php?id='.$row['id'].'"><img src="images/'.$row['id'].'.jpg" height="112" alt=""/></a> <a href="photo.php?id='.$row['id'].'"><img src="images/'.$row['id'].'.jpg" height="112" alt=""/></a> </td> <td class="right"> <a href="photo.php?id='.$row['id'].'"><img src="images/'.$row['id'].'.jpg" height="72" alt=""/></a> <a href="photo.php?id='.$row['id'].'"><img src="images/'.$row['id'].'.jpg" height="72" alt=""/></a> <a href="photo.php?id='.$row['id'].'"><img src="images/'.$row['id'].'.jpg" height="72" alt=""/></a> </td></tr></table>'; } ?>Screen Shot 2014-08-20 at 15.46.31 (2).jpg 35.86KB 0 downloads Thanks Edited by JimmyLeaman, 20 August 2014 - 09:49 AM. Hi, I have this array: $cats = array( "A"=>'Business Expansion Specialist', "B"=>'Affiliate Page', "C"=>'Personal: Hobbies', "D"=>'Personal: Pets', "E"=>'Personal: Holidays', "F"=>'Personal: Sport', "G"=>'Personal: C.V.', "H"=>'Personal: Other', "I"=>'For Sale: Antiques', "Z"=>'Other' );
And then from a table I get the variable $cat_cd. $cat_cd contains 'F' so it refers to 'Personal: Sport' If I want to put that in $category, how would I write that? I thought it might be .... $category = $cats['$cat_cd']; I tried that and it didn't work .
Thanks
Consider this scenario: I'm using an ajax to make the form use only one page I got a multistep form with step3 being the result of step2, within step3 there is an "add more steps" button which duplicates step2 and step3, this can be done countless times. to complement this I added array to my input boxes something like this: Code: [Select] <input type="text" name="name[]" id="name"/> unfortunately, I'm not sure how to approach this in the php. In the step2 going to step3, I would call the brand id and use it in the database to get the results for step3, but now it's array I added the following lines $brand = $this->input->post('brand[]'); $this->load->model('MBest'); $q = $this->MBest->getbestmatching($brand[0]); But the $brand[0] doesn't works and triggers an error. And come to think of it, if I call a $brand[0] index, then everytime a person add a new step, it will always use the id of the first result. Are there any ideas on how to fix this problem? Thanks I am validating a form, and if there are errors in the input, the error array is filled with appropriate mssg and the "sticky" form with right values is shown back, and errors on top. Example: first name, last name, email, date of birth. each field is validated,and if for example first name does not pass,i will nullify the value and populate error array like below: $_SESSSION['error']['fname']="Please check the format of the name,can contain only alphabets!" $_SESSSION['error']['email']="Please check the format of email!" When I slap back the form, last name has passed, and so will have the previously entered value, but first name and email will be empty, and i need to know how to display the 2 errors on top of the form. It uses post method, and posts to itself. I have a function which finds a list of companies associated with a country from a custom taxonomy. It finds their logo and creates an output which is all logos associated with a country, and the logo has a href to link to a company page. The code for this is: function countryCompanies(){ global $post;
$echo = f_print(array(
The f_print function finds the logos, and their sizes. So the 'mainlogo' type is a pull down of the thumbnail at 200px size.
What I need to do is write CSS and PHP which will display these results in a grid, 4 colums across, and as many down as results from the array. At the moment all I can get is all the results in one column. What tutorials would I need to write appropriate CSS to create this, and then is it as simple as adding the div prior to the echo of the $echo variable? Thanks Hi, I've used this code before, but have had to make some modifications and am now getting a mysql fetch array error: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/tesolcla/public_html/test/results10k201010.php on line 134 If anyone can help, it would be much appreciated. Code: [Select] <?php $dbcnx = @mysql_connect('localhost', 'MYUSERNAME', 'MYPASSWORD'); //$dbcnx = @mysql_connect('localhost', 'root', 'mysql'); if (!$dbcnx) { exit('<p>Unable to connect to the ' . 'database server at this time.</p>'); } if (!@mysql_select_db('MYDATABASE')) { //if (!@mysql_select_db('rac')) { exit('<p>Unable to locate the results ' . 'database at this time.</p>'); } $asc_on = '<img src="images/results_sorting/Asc.gif" border="0" />'; $asc_off= '<img src="images/results_sorting/AscOff.gif" border="0" />'; $desc_on = '<img src="images/results_sorting/Desc.gif" border="0" />'; $desc_off= '<img src="images/results_sorting/DescOff.gif" border="0" />'; $sortfield = isset($_GET['sort']) ? $_GET['sort'] : '4'; $sorttype = isset($_GET['type']) ? $_GET['type'] : '1'; for($i=1; $i<5; $i++) { if($i==$sortfield) { if ($sorttype==1) $srt[$i] = $asc_on.'<a href="?sort='.$i.'&type=2">'.$desc_off.'</a>'; else $srt[$i] = '<a href="?sort='.$i.'&type=1">'.$asc_off.'</a>'.$desc_on; } else { $srt[$i] = '<a href="?sort='.$i.'&type=1">'.$asc_off.'</a><a href="?sort='.$i.'&type=2">'.$desc_off.'</a>'; } } $fields = array("firstname", "lastname", "time", "position"); $sorts = array("ASC", "DESC"); $field = $fields[$sortfield-1]; $sort = $sorts[$sorttype-1]; $field = $field=="" ? $fields[4] : $field; $sort = $sort=="" ? $sorts[0] : $sort; $sql = mysql_query("SELECT firstname, lastname, time, position FROM 10k_results ORDER BY $field $sort"); echo "<table border='1' align='center' bordercolor='#000000' CELLPADDING=5 cellspacing='0' STYLE='font-size:13px'>"; echo "<tr bgcolor='#008000' STYLE='color:white'> <td>*</td><td><H3>First name $srt[1]</h3></td> <td><H3>Lastname $srt[2]</H3></td> <td><H3>Time $srt[3]</H3></td> <td><H3>Position $srt[4]</H3></td></tr>"; // keeps getting the next row until there are no more to get $row_counter = 1; //create row counter with default value 0 // Print out the contents of each row into a table while ($row = mysql_fetch_array($sql)) { // Print out the contents of each row into a table echo "<tr>\n"; echo "</td><td>"; echo $row_counter++; echo "</td>"; echo "<td>{$row['firstname']}</td>\n"; echo "<td>{$row['lastname']}</td>\n"; echo "<td>{$row['time']}</td>\n"; echo "<td>{$row['position']}</td>\n"; echo "</tr>\n"; } echo "</table>"; ?> I am trying to give role based access here. I want to display the pages which user has access in checkbox format. Here is my code $sql = "SELECT p.page_id AS pid, p.page, p.href, ra.pages AS rpage FROM pages p INNER JOIN role_access ra WHERE p.page_id IN (ra.page) AND ra.role=1"; $query = mysqli_query($con, $sql) or die(mysqli_error($con)); $checked_arr = array(); while($row = mysqli_fetch_array($query)) { $checked_arr = explode(",",$row['rpage']); foreach ($checked_arr as $page) { echo "<br/><input type='checkbox' name=\"pages[]\" value='$page' />$page<br>"; } My tables are like this ROLE CREATE TABLE `role` ( `rid` int(5) NOT NULL, `role_name` varchar(50) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO `role` (`rid`, `role_name`) VALUES (1, 'Admin'), (2, 'Others'); ALTER TABLE `role` ADD PRIMARY KEY (`rid`); ROLE-ACCESS CREATE TABLE `role_access` ( `id` int(10) NOT NULL, `page` varchar(160) NOT NULL, `role` int(7) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO `role_access` (`id`, `page`, `role`) VALUES (1, '1,2,3,4,5', 1), (2, '2,4,5', 2); ALTER TABLE `role_access` ADD PRIMARY KEY (`id`); PAGES CREATE TABLE `pages` ( `page_id` int(11) NOT NULL, `code` varchar(10) NOT NULL, `page` varchar(100) NOT NULL, `href` varchar(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; INSERT INTO `pages` (`page_id`, `code`, `page`, `href`) VALUES (1, 'Patient', 'Registration', '/patient_registration.php'), (2, 'Patient', 'List', '/patient_list.php'), (3, 'Patient', 'Edit', '/edit_patient.php'), (4, 'Patient', 'Export', '/export_patient.php'), (5, 'Patient', 'MRD', '/patient_MRD.php'); ALTER TABLE `pages` ADD PRIMARY KEY (`page_id`);
In above query i get result like this
But required result is
if i change checkbox display like while($row = mysqli_fetch_array($query)) { $checked_arr = explode(",",$row['rpage']); $pname = $row['page']; foreach ($checked_arr as $page) { echo "<br/><input type='checkbox' name=\"pages[]\" value='$page' />$pname<br>"; } } i get result
How to get the names for that file.
Ok so for some reasons on my register and edit profile page when i hit submit it says that i have not filled in all the info i need.. Even after i fill all of them in.. but heres the code for the register form.. Code: [Select] <?php require("top.php"); ?> <div id='homeright'> <?php echo "<font size='6'>Sign up</font>"; echo "<hr width='75%' align='left'/>"; $form = "<form action='index.php' method='post'> <table cellspacing='5px'> <tr> <td>First Name:</td> <td class='register'><input type='text' name='firstname' class='textbox' size='35'></td> </tr> <tr> <td>Last Name:</td> <td><input type='text' name='lastname' class='textbox' size='35'></td> </tr> <tr> <td>Username:</td> <td><input type='text' name='username' class='textbox' size='35'></td> </tr> <tr> <td>E-mail:</td> <td><input type='text' name='email' class='textbox' size='35'></td> </tr> <tr> <td>Password:</td> <td><input type='password' name='password' class='textbox' size='35'></td> </tr> <tr> <td>Confirm Password:</td> <td><input type='password' name='repassword' class='textbox' size='35'></td> </tr> <tr> <td></td> <td><input type='submit' name='submitbtn' value='Register' class='button'></td> </tr> </table> </form>"; if ($_POST['submitbtn']){ $firstname = fixtext($_POST['firstname']); $lastname = fixtext($_POST['lastname']); $username = fixtext($_POST['username']); $email = fixtext($_POST['email']); $password = fixtext($_POST['password']); $repassword = fixtext($_POST['repassword']); $website = fixtext($_POST['website']); $youtube = fixtext($_POST['youtube']); $bio = fixtext($_POST['bio']); $name = $_FILES['avatar'] ['name']; $type = $_FILES['avatar'] ['type']; $size = $_FILES['avatar'] ['size']; $tmpname = $_FILES['avatar']['tmpname']; $ext = substr($name, strrpos($name, '.')); if ($firstname && $lastname && $username && $email && $password && $repassword){ if ($password == $repassword){ if (strstr($email, "@") && strstr($email, ".") && strlen($email) >= 6){ require("scripts/connect.php"); /*$query = mysql_query("SELECT * FROM users WHERE username='$username' ");*/ $query=mysql_query("SELECT * FROM users WHERE username='$username' ") or die(mysql_error()); $numrows = mysql_num_rows($query); if ($numrows == 0){ /*$query=mysql_query("SELECT * FROM users WHERE email='$email' ");*/ $query=mysql_query("SELECT * FROM users WHERE email='$email' ") or die(mysql_error()); $numrows=mysql_num_rows($query); if ($numrows == 0){ $pass = md5(md5($password)); $date = date("F d, Y"); if($name){ move_uploaded_file($tmpname, "avatars/$username.$ext"); $avatar = "$username.$ext"; } else $avatar = "/avatars/default_avatar.png"; $code = substr (md5(rand(11111111111, 999999999999999)), 2, 25); mysql_query("INSERT INTO users (`first_name`,`last_name`,`username`,`email`,`password`,`avatar`,`bio`,`website`,`youtube`,`last_login`,`active`,`code`,`locked`,`date`) VALUES ( '$firstname', '$lastname', '$username', '$email', '$pass', '$avatar', '$bio', '$website', '$youtube', '', '0', '$code', '0', '$date')"); /*mysql_query("INSERT INTO users (Field, Type) VALUES ('', '$firstname', '$lastname', '$username', '$email', 'pass', '$avatar', '$bio', '$website', '$youtube', '', '0', '$code', '0', '$date')");*/ $webmaster = "Admin@trucksite.com"; $subject = "Activate Your Account!"; $headers = "From: Admin <$webmaster>"; $message = "Hello $firstname.\n\nWelcome to trucksite below is a link for you to activate your account!.\n http://tprofiletesting.net23.net/activate.php?code=$code"; mail($email, $subject, $message, $headers); echo "Your activation email has been sent to <b>$email</b>."; } else echo "That email is currently in use."; } else echo "That username is currently in use."; } else echo "You did not enter a vaild email."; } else echo "Your passwords did not match."; } else echo"You did not fill in all the required fields."; } echo "$form"; ?> </div> <div id='homeleft'> <center><font size='6'>Create! Showoff! Educate!</font></center> <hr /> </div> </body> </html> Howdy All i currently have Code: [Select] <? echo $guild ['name'];?> and i want to put <> around what is shown from the $guild ['name'] , but where ever i try the <> it cancels out and just doesnt show the name any more - currently its making us do the following <-<? echo $guild ['name'];?>-> as even if we try an echo with jsut the < and > it cancels it out Any specific way in which i can do this thanks Hi! Im in need of some help. I had a form built for me and im attempting to make it so some details are required eg name, cc number etc. But i cannot figure out how to do it. I only have dreamweaver cs4 and i attempted to do it through that but when i uploaded the form it didnt work. The form is located he https://eatatmenzies.com.au/catering_menu.php and my code it as follows [[code]<?php $teaandcoffee=$_POST['teaandcoffee']; $teaandcoffeeallday=$_POST['teaandcoffeeallday']; $orangejuice=$_POST['orangejuice']; $mineralwater=$_POST['mineralwater']; $cookies=$_POST['cookies']; $slices=$_POST['slices']; $minimuffins=$_POST['minimuffins']; $texanmuffins=$_POST['texanmuffins']; $bananaorcarrotcake=$_POST['bananaorcarrotcake']; $minidanishes=$_POST['minidanishes']; $assprtedsandwhiches4points=$_POST['assprtedsandwhiches4points']; $assortedsandwhiches6points=$_POST['assortedsandwhiches6points']; $c1=$_POST['c1']; $c2=$_POST['c2']; $c3=$_POST['c3']; $c4=$_POST['c4']; $c5=$_POST['c5']; $Tandoorichickenskewers=$_POST['Tandoorichickenskewers']; $Californiasushirolls=$_POST['Californiasushirolls']; $Thaiprawnskewers=$_POST['Thaiprawnskewers']; $Roastedvegetablefrittata=$_POST['Roastedvegetablefrittata']; $Vegetablesamosas=$_POST['Vegetablesamosas']; $Smokedsalmontarts=$_POST['Smokedsalmontarts']; $Cocktailspringrolls=$_POST['Cocktailspringrolls']; $DimSims=$_POST['DimSims']; $c6=$_POST['c6']; $Beefsatay=$_POST['Beefsatay']; $Orangeandhoneydrumsticks=$_POST['Orangeandhoneydrumsticks']; $Antipastoplatter=$_POST['Antipastoplatter']; $Roastedvegandcumincouscous=$_POST['Roastedvegandcumincouscous']; $Coleslaw=$_POST['Coleslaw']; $Potatoandeggsaladwithchives=$_POST['Potatoandeggsaladwithchives']; $Basilandcherrytomatofusilli=$_POST['Basilandcherrytomatofusilli']; $greensalad=$_POST['greensalad']; $ceasarsalad=$_POST['ceasarsalad']; $freshfruitsaad=$_POST['freshfruitsaad']; $breadrollsandbutter=$_POST['breadrollsandbutter']; $freshseasonalfruitplatter=$_POST['freshseasonalfruitplatter']; $cheeseplatter=$_POST['cheeseplatter']; $Name=$_POST['Name']; $deliveryaddress=nl2br($_POST['deliveryaddress']); $DeliveryDate=$_POST['DeliveryDate']; $DeliveryTime=$_POST['DeliveryTime']; $ContactForm=$_POST['ContactForm']; $comments=nl2br($_POST['comments']); $totalamount=$_POST['totalamount']; $gtotalamount=$_POST['gtotalamount']; $gst=$_POST['gst']; $discount=$_POST['discount']; $ccno=$_POST['ccno1'].$_POST['ccno2'].$_POST['ccno3'].$_POST['ccno4']; $CardExpiry=$_POST['CardExpiry']; $ccv=$_POST['ccv']; if($_POST['submit_2']==1) { $ipadd=$_SERVER['REMOTE_ADDR']; $to = 'derek@eatatmenzies.com.au'; $subject = 'New Catering Order'; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'From: mail@EatAtMenzies.com.au' . "\r\n" . 'Reply-To: mail@EatAtMenzies.com.au' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); $mailbody=<<<EWURPO <table width="575" border="0" align="center" cellpadding="0" cellspacing="2"> <tbody> <tr> <td colspan="3"><h2> <hr color="#333333" noshade="noshade" size="1" /> </h2></td> </tr> <tr> <td width="284"><h1>Refreshments</h1></td> <td width="122"><p>per person<br /> </p></td> <td width="161"><p>QTY</p></td> </tr> <tr> <td><p>Tea & Coffee</p></td> <td><p>$2.50 </p></td> <td>$teaandcoffee </td> </tr> <tr> <td><p>Tea & Coffee (all day)</p></td> <td><p>$8.50</p></td> <td>$teaandcoffeeallday</td> </tr> <tr> <td><p>Orange Juice</p></td> <td><p>$2.50</p></td> <td>$orangejuice</td> </tr> <tr> <td><p>Mineral Water</p></td> <td><p>$2.00</p></td> <td>$mineralwater</td> </tr> <tr> <td height="50"><br /></td> <td colspan="2"><br /></td> </tr> <tr> <td><h1>Morning & Afternoon Tea</h1></td> <td><p>per person<br /> </p></td> <td><p>QTY</p></td> </tr> <tr> <td><p>Cookies</p></td> <td><p>$2.50 </p></td> <td><p> $cookies </p></td> </tr> <tr> <td><p>Slices</p></td> <td><p>$3.00</p></td> <td>$slices</td> </tr> <tr> <td><p>Muffins (mini)</p></td> <td><p>$1.50</p></td> <td>$minimuffins</td> </tr> <tr> <td><p>Muffins (Texan)</p></td> <td><p>$3.00</p></td> <td>$texanmuffins</td> </tr> <tr> <td valign="top"><p>Banana or Carrot cake</p></td> <td valign="top"><p>$2.50</p></td> <td valign="top">$bananaorcarrotcake</td> </tr> <tr> <td><p>Mini Danishes</p></td> <td><p>$1.50</p></td> <td>$minidanishes</td> </tr> <tr> <td height="50"><br /></td> <td colspan="2"><br /></td> </tr> <tr> <td><h1>Sandwich Platters</h1></td> <td><p>per person<br /> </p></td> <td><p>QTY</p></td> </tr> <tr> <td><p>Assorted sandwiches (4 points)</p></td> <td><p>$5.00 </p></td> <td> $assprtedsandwhiches4points</td> </tr> <tr> <td><p>Assorted sandwiches (6 points)</p></td> <td><p>$6.80 per person</p></td> <td> $assortedsandwhiches6points</td> </tr> <tr> <td height="50"><br /></td> <td colspan="2"><br /></td> </tr> <tr> <td><h1>Finger Food Platters</h1></td> <td colspan="2">� <p>per person<br /> </p></td> </tr> <tr> <td colspan="3"><p>Items listed below are based on 2 pieces per serve (minimum 8 people)</p></td> </tr> <tr> <td> </td> <td> </td> <td><p>QTY</p></td> </tr> <tr> <td><p>Caramalised onion & goats cheese tarts (V)</p></td> <td><p>$1.50 </p></td> <td>$c1</td> </tr> <tr> <td><p>Mini cottage pies</p></td> <td><p>$2.00</p></td> <td>$c2</td> </tr> <tr> <td><p>Canap�s with tomato & basil salsa (V)</p></td> <td><p>$1.20</p></td> <td>$c3</td> </tr> <tr> <td><p>Canap�s with smoked salmon and cream cheese</p></td> <td><p>$1.80</p></td> <td>$c4</td> </tr> <tr> <td><p>Home made sausage rolls</p></td> <td><p>$1.60</p></td> <td>$c5</td> </tr> <tr> <td><p>Tandoori chicken skewers</p></td> <td><p>$2.00</p></td> <td> $Tandoorichickenskewers </td> </tr> <tr> <td><p>California sushi rolls</p></td> <td><p>$1.80</p></td> <td>$Californiasushirolls</td> </tr> <tr> <td><p>Thai prawn skewers</p></td> <td><p>$2.60</p></td> <td>$Thaiprawnskewers</td> </tr> <tr> <td><p>Roasted vegetable frittata</p></td> <td><p>$1.80</p></td> <td>$Roastedvegetablefrittata</td> </tr> <tr> <td><p>Vegetable samosas</p></td> <td><p>$1.50</p></td> <td>$Vegetablesamosas</td> </tr> <tr> <td><p>Smoked salmon tarts</p></td> <td><p>$1.80</p></td> <td>$Smokedsalmontarts</td> </tr> <tr> <td><p>Cocktail spring rolls</p></td> <td><p>$1.50</p></td> <td>$Cocktailspringrolls</td> </tr> <tr> <td><p>Dim Sims<br /> </p></td> <td><p>$1.50</p></td> <td>$DimSims</td> </tr> <tr> <td><p>Cheese & sun dried tomato puffs (V)</p></td> <td><p>$1.30</p></td> <td>$c6</td> </tr> <tr> <td><p>Beef satay</p></td> <td><p>$2.00</p></td> <td>$Beefsatay</td> </tr> <tr> <td><p>Orange and honey drumsticks</p></td> <td><p>$2.50</p></td> <td>$Orangeandhoneydrumsticks</td> </tr> <tr> <td height="50"><br /></td> <td colspan="2"><br /></td> </tr> <tr> <td><h1>Antipasto Platter</h1></td> <td valign="top"><p>$8.00 per person</p></td> <td valign="top"><p>QTY</p></td> </tr> <tr> <td><p>(minimum 4 people)</p></td> <td><p><br /> </p></td> <td>$Antipastoplatter</td> </tr> <tr> <td colspan="3"><p>Including: Olives, prosciutto, salami, pesto salad with bocconcini and tomato & roasted red capsicum</p></td> </tr> <tr> <td height="50"><br /></td> <td colspan="2"><br /></td> </tr> <tr> <td><h1>Salads</h1></td> <td colspan="2"><br /></td> </tr> <tr> <td><p>(minimum 4 people)</p></td> <td><p>per person<br /> </p></td> <td><p>QTY</p></td> </tr> <tr> <td><p>Roasted veg and cumin cous cous</p></td> <td><p>$2.50 </p></td> <td> $Roastedvegandcumincouscous</td> </tr> <tr> <td><p>Coleslaw</p></td> <td><p>$2.50</p></td> <td>$Coleslaw</td> </tr> <tr> <td><p>Potato and egg salad with chives</p></td> <td><p>$2.50</p></td> <td> $Potatoandeggsaladwithchives </td> </tr> <tr> <td><p>Basil and cherry tomato fusilli</p></td> <td><p>$2.50</p></td> <td>$Basilandcherrytomatofusilli</td> </tr> <tr> <td><p>Green salad</p></td> <td><p>$2.50</p></td> <td>$greensalad</td> </tr> <tr> <td><p>Caesar Salad</p></td> <td><p>$3.00</p></td> <td>$ceasarsalad</td> </tr> <tr> <td><p>Fresh fruit salad</p></td> <td><p>$3.80</p></td> <td>$freshfruitsaad</td> </tr> <tr> <td><p>Bread rolls and butter</p></td> <td><p>$1.00</p></td> <td>$breadrollsandbutter</td> </tr> <tr> <td height="50"><br /></td> <td colspan="2"><br /></td> </tr> <tr> <td><h1>Fresh Seasonal Fruit Platter</h1></td> <td valign="top"><p>$5.00 per person</p></td> <td valign="top"><p>QTY</p></td> </tr> <tr> <td><p>(minimum 4 people)</p></td> <td><p><br /> </p></td> <td>$freshseasonalfruitplatter</td> </tr> <tr> <td height="25"><p><br /> </p></td> <td colspan="2"><p><br /> </p></td> </tr> <tr> <td><h1>Cheese Platter</h1></td> <td valign="top"><p>$5.00 per person</p></td> <td valign="top"><p>QTY</p></td> </tr> <tr> <td><p>(minimum 4 people)</p></td> <td><p><br /> </p></td> <td>$cheeseplatter</td> </tr> <tr> <td colspan="3"><p>A soft, a cheddar and a blue, served with fresh grapes & biscuits</p></td> </tr> <tr> <td colspan="3"><br /></td> </tr> </tbody> </table> <table width="575" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="156"><p>Name:</p></td> <td width="419"><p> $Name </p></td> </tr> <tr> <td width="156"><p>Credit Card Number:</p></td> <td width="419"><p> $ccno </p></td> </tr> <tr> <td width="156"><p>Card Expiry:</p></td> <td width="419"><p> $CardExpiry </p></td> </tr> <tr> <td width="156"><p>Card Expiry:</p></td> <td width="419"><p> $ccv </p></td> </tr> <tr> <td><p>Delivery Address:</p></td> <td><p> $deliveryaddress </p></td> </tr> <tr> <td><p>Delivery Date:</p></td> <td><p> $DeliveryDate </p></td> </tr> <tr> <td><p>Aprrox Delivery Time:</p></td> <td><p> $DeliveryTime </p></td> </tr> <tr> <td><p>Contact Number:</p></td> <td><p> $ContactForm </p></td> </tr> <tr> <td><p>Comments:</p></td> <td>$comments</td> </tr> <tr> <td> </td> <td><h1>Sub Total: $totalamount</h1></td> </tr> <tr> <td> </td> <td><h1>Discounts: $discount</h1></td> </tr> <tr> <td> </td> <td><h1>GST: $gst</h1></td> </tr> <tr> <td> </td> <td><h1>Grand Total: $gtotalamount</h1></td> </tr> </table> <br /><br /> This form was submitted by this IP ($ipadd) EWURPO; mail($to, $subject, $mailbody, $headers); ?> <!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>Eat @ Menzies - Catering menu - Order Online</title> <link href="style.css" rel="stylesheet" type="text/css" /> <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script> <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" /> <style type="text/css"> <!-- body { background-color: #CCC; } #wrapper #container #content #menu table tr td #MenuBar2 li a{ color: #000; } #wrapper #container #content #menu table tr td #MenuBar2 li a:hover{ color: #FFF; } --> </style></head> <body> <div id="wrapper"> <div id="container"> <div id="logo"><a href="index.html"><img src="images/logo.jpg" alt="eat at menzies" width="360" height="139" border="0" longdesc="http://www.eatatmenzies.com.au" /></a></div> <div id="content"> <div id="menu"> <table width="573" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="6" height="67" align="center"> </td> <td width="59" align="center"><a href="index.html">Home</a></td> <td width="57" align="center"><a href="menu.html">Menu</a></td> <td width="69" align="center"><a href="the_toad.html">The Toad</a></td> <td width="156" align="center">Catering & Functions</td> <td width="158" align="center"><a href="meal_plans.html">Resident Meal Plans</a></td> <td width="54" align="center"><a href="contact.html">Contact</a></td> <td width="14" align="center"> </td> </tr> </table> </div> <div id="left_content"> <p>Menzies College<br /> La Trobe University<br /> Bundoora, 3086</p> <p>Tel: 03 9479 3289<br /> Email: mail@EatAtMenzies.com.au</p> </div> <div id="right_content"><form method="post" action="catering_menu.php"> <table width="696" border="0" cellspacing="0" cellpadding="0"> <tr> <td><img src="images/right_top.jpg" width="696" height="51" /></td> </tr> <tr> <td bgcolor="#FFFFFF"><table width="690" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="28"> </td> <td width="644"><h1>Catering Menu & Order Form</h1> <p> </p> <p><strong>Your catering order was submitted successfully. <br /> To contact us, please email</strong> <a href="mailto:mail@EatAtMenzies.com.au">mail@EatAtMenzies.com.au</a> <strong>or call 9479 3289.</strong></p> <p><strong>Free delivery within campus for orders over $50.00. <br /> Prices are subject to change without further notice.</strong></p> <p><strong><br /> </strong></p> <p> </p></td> <td width="18"> </td> </tr> </table></td> </tr> <tr> <td><img src="images/right_bottom.jpg" width="696" height="68" /></td> </tr> </table> </form> </div> <div id="footer"><a href="http://www.tizzbizzdesign.com.au">Wesbite By Tizz Bizz Design</a></div> </div> </div> </div> </body> </html> <?} else {?> <!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> <script type="text/javascript" src="js/prototype.js"></script> <script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script> <script type="text/javascript" src="js/lightbox.js"></script> <link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Eat @ Menzies - Catering menu - Order Online</title> <link href="style.css" rel="stylesheet" type="text/css" /> <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script> <script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script> <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" /> <style type="text/css"> <!-- body { background-color: #CCC; } #wrapper #container #content #menu table tr td #MenuBar2 li a{ color: #000; } #wrapper #container #content #menu table tr td #MenuBar2 li a:hover{ color: #FFF; } --> </style> <link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="wrapper"> <div id="container"> <div id="logo"><a href="index.html"><img src="images/logo.jpg" alt="eat at menzies" width="360" height="139" border="0" longdesc="http://www.eatatmenzies.com.au" /></a></div> <div id="content"> <div id="menu"> <table width="573" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="7" height="67" align="center"> </td> <td align="center"><table border="0" cellspacing="0" cellpadding="12"> <tr> <td><a href="index.html">Home</a></td> <td><a href="menu.html">Menu</a></td> <td><a href="the_toad.html">The Toad</a></td> <td>Catering & Functions</td> <td><a href="meal_plans.html">Resdient Meal Plans</a></td> <td><a href="contact.html">Contact</a></td> </tr> </table></td> <td width="12" align="center"> </td> </tr> </table> </div> <div id="left_content"> <p>Menzies College<br /> La Trobe University<br /> Bundoora, 3086</p> <p>Tel: 03 9479 3289<br /> Email: mail@EatAtMenzies.com.au</p> </div> <div id="right_content"> <form name="cform" method="post" action="catering_menu.php"> <input type="hidden" name="teaandcoffee" value="<?=$teaandcoffee?>" /> <input type="hidden" name="teaandcoffeeallday" value="<?=$teaandcoffeeallday?>" /> <input type="hidden" name="orangejuice" value="<?=$orangejuice?>" /> <input type="hidden" name="mineralwater" value="<?=$mineralwater?>" /> <input type="hidden" name="cookies" value="<?=$cookies?>" /> <input type="hidden" name="slices" value="<?=$slices?>" /> <input type="hidden" name="minimuffins" value="<?=$minimuffins?>" /> <input type="hidden" name="texanmuffins" value="<?=$texanmuffins?>" /> <input type="hidden" name="bananaorcarrotcake" value="<?=$bananaorcarrotcake?>" /> <input type="hidden" name="minidanishes" value="<?=$minidanishes?>" /> <input type="hidden" name="assprtedsandwhiches4points" value="<?=$assprtedsandwhiches4points?>" /> <input type="hidden" name="assortedsandwhiches6points" value="<?=$assortedsandwhiches6points?>" /> <input type="hidden" name="c1" value="<?=$c1?>" /> <input type="hidden" name="c2" value="<?=$c2?>" /> <input type="hidden" name="c3" value="<?=$c3?>" /> <input type="hidden" name="c4" value="<?=$c4?>" /> <input type="hidden" name="c5" value="<?=$c5?>" /> <input type="hidden" name="c6" value="<?=$c6?>" /> <input type="hidden" name="Tandoorichickenskewers" value="<?=$Tandoorichickenskewers?>" /> <input type="hidden" name="Californiasushirolls" value="<?=$Californiasushirolls?>" /> <input type="hidden" name="Thaiprawnskewers" value="<?=$Thaiprawnskewers?>" /> <input type="hidden" name="Roastedvegetablefrittata" value="<?=$Roastedvegetablefrittata?>" /> <input type="hidden" name="Vegetablesamosas" value="<?=$Vegetablesamosas?>" /> <input type="hidden" name="Smokedsalmontarts" value="<?=$Smokedsalmontarts?>" /> <input type="hidden" name="Cocktailspringrolls" value="<?=$Cocktailspringrolls?>" /> <input type="hidden" name="DimSims" value="<?=$DimSims?>" /> <input type="hidden" name="Beefsatay" value="<?=$Beefsatay?>" /> <input type="hidden" name="Orangeandhoneydrumsticks" value="<?=$Orangeandhoneydrumsticks?>" /> <input type="hidden" name="Antipastoplatter" value="<?=$Antipastoplatter?>" /> <input type="hidden" name="Roastedvegandcumincouscous" value="<?=$Roastedvegandcumincouscous?>" /> <input type="hidden" name="Coleslaw" value="<?=$Coleslaw?>" /> <input type="hidden" name="Potatoandeggsaladwithchives" value="<?=$Potatoandeggsaladwithchives?>" /> <input type="hidden" name="Basilandcherrytomatofusilli" value="<?=$Basilandcherrytomatofusilli?>" /> <input type="hidden" name="greensalad" value="<?=$greensalad?>" /> <input type="hidden" name="ceasarsalad" value="<?=$ceasarsalad?>" /> <input type="hidden" name="freshfruitsaad" value="<?=$freshfruitsaad?>" /> <input type="hidden" name="breadrollsandbutter" value="<?=$breadrollsandbutter?>" /> <input type="hidden" name="freshseasonalfruitplatter" value="<?=$freshseasonalfruitplatter?>" /> <input type="hidden" name="cheeseplatter" value="<?=$cheeseplatter?>" /> <input type="hidden" name="gtotalamount" value="<?=$gtotalamount?>" /> <input type="hidden" name="totalamount" value="<?=$totalamount?>" /> <input type="hidden" name="discount |