Jump to content

Ali25m

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Ali25m's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. yes .php works fine on my local machine have checked all file extensions etc see above post ^^
  2. Have you you tried adding the following line at the top of your script error_reporting(0);
  3. I've already tried phpinfo (); (sorry I should have mentioned that) and it loads as text as well. Here is one of the pages I've created <?php error_reporting(0); include 'sdconnection.php'; $name = $_POST['name']; $issue = $_POST['issue']; $room = $_POST['room']; $date = $_POST['date']; $month = $_POST['month']; $year = $_POST['year']; $title = $_POST['title']; $error = ""; if (empty($_POST['name'])) { $error = $error."<br/><b><font color = 'red'>You must enter a name</b></font>"; } if (empty($_POST['room'])) { $error = $error."<br/><b><font color = 'red'>You must enter a room</b></font>"; } if (empty($_POST['title'])) { $error = $error."<br/><b><font color = 'red'>You must enter a title</b></font>"; } if (empty($_POST['issue'])) { $error = $error."<br/><b><font color = 'red'>You must enter a issue</b></font>"; } if (empty($_POST['date'])) { $error = $error."<br/><b><font color = 'red'>You must enter a date</b></font>"; } if (empty($_POST['month'])) { $error = $error."<br/><b><font color = 'red'>You must enter a month</b></font>"; } if (empty($_POST['year'])) { $error = $error."<br/><b><font color = 'red'>You must enter a year</b></font>"; } if (empty($error)) { $q = "INSERT INTO jobs (name, room, issue, date, month, year, title ) VALUES ('$name', '$room','$issue','$date','$month','$year','$title')"; $res = mysql_query($q) or die (mysql_error()); } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Untitled Document</title> <link rel="stylesheet" href="IE8style.css" type="text/css" /> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- .style1 {color: #B90302} --> </style> </head> <body> <div id="wrap"> <div id="header"> <h1> Whickham school service desk requests </h1> </div> <div id="nav"> <ul> <li><a href="index.html" title="home page">home</a></li> <li><a href="" class="selected" title="">staff links</a></li> <li><a href="students.html" title="">student links</a></li> <li><a href="search.html" title="">search engines</a></li> <li><a href="info.html" title="">useful information</a></li> </ul> </div> <ul> </ul> <div id="content"> <div id="page"> <form method="post" action="http://localhost/Unnamed site 1/servicedesk.php"> <label for="name">Name</label> <br/> <input type="text" name="name" id="name"> <br/> <label for="Room">Room</label> <br/><input type="text" name="room" id="room"><br/> <br/> <label for="Title">Title</label> <br/> <input type="text" name="title" id="title"> <br/> <label for="Issue">Issue</label> <br/> <textarea cols="50" rows="10" name="issue" id="issue" ></textarea> <br/> <label for="date">Date</label> <br/> <select name="date" tabindex="6" id="date"> <option></option> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> <option>6</option> <option>7</option> <option>8</option> <option>9</option> <option>10</option> <option>11</option> <option>12</option> <option>13</option> <option>14</option> <option>15</option> <option>16</option> <option>17</option> <option>18</option> <option>19</option> <option>20</option> <option>21</option> <option>22</option> <option>23</option> <option>24</option> <option>25</option> <option>26</option> <option>27</option> <option>28</option> <option>29</option> <option>30</option> <option>31</option> </select> <br/> <br/> <label for="Month"><b>Month</b></label> <br/> <select name="month" tabindex="7" id="month"> <option></option> <option>January</option> <option>February</option> <option>March</option> <option>April</option> <option>May</option> <option>June</option> <option>July</option> <option>August</option> <option>September</option> <option>October</option> <option>Novemeber</option> <option>December</option> </select> <br/> <br/> <label for="year">Year</label> <br/> <select name="year"> <option></option> <option>2010</option> <option>2011</option> <option>2012</option> <option>2013</option> <option>2014</option> </select> <br/> <br/> <input type="hidden" name="hidden" value="1"> <br/> <input type="submit"> <br/><br/> <?php if (isset($error) && $_POST['hidden']==1) { echo $error; } ?> </form> <h3> <script language="JavaScript"> function openWindow(url, name, rs, w, h) { var resize = ""; if (rs) { resize = "resizable,"; } popupWin = window.open(url, name, 'scrollbars=yes,menubar=no,'+ resize + 'width=' + w + ',height=' + h); popupWin.focus(); } </script> </h3> </div> <div id="sidebar"> <h4>Quick Links</h4> <ul> <li><a href="http://www.google.co.uk">Google</a></li> <li><a href="http://www.yahoo.co.uk">Yahoo UK</a></li> <li><a href="http://www.bbc.co.uk">BBC</a></li> <li><a href="http://localhost/servicedesk.php">Service Desk</a></li> <li><a href="http://www.whickhamschool.org/">Whickham School Website</a></li> <li><a href="http://inty/email/index.php">Whickham School Email</a> </li> <li><a href="http://10.10.0.7/__internal__/cmgr/connection.html">Log on to Inty</a></li> </ul> </div> <div id="footer"> </div> </div> </body> </html>
  4. thanks for the quick response, my code is on my machine at work so I'll post a script tomorrow morning. Cheers
  5. Hi guys, I've been searching about on this topic for a little while and haven't come across a working answer as of yet. The issue I am having is that after an install of wamp on my 2003 server the php pages are displayed in the browser as text instead of html. I the files have been saved correctly so they are not .txt files and have the correct encoding. The phpmyadmin site loads great and I have created databases so mysql is up and running too. The other strange aspect is that the php files were developed on my local machine and tested/ debugged untill working so again I'm sure its not the files. I have tried a reinstall of wamp with no sucess. So the only conclusion I can come to is it is an issue within the config files either the php.ini or the apache httpd conf or both. What really has me puzzled is that the install process on my local machine was exactly the same as on the 2003 server and they work fine locally????? Any sujestions/ideas are appriciated.
  6. Ali25m

    css/php issue

    I'm testing it on IE8 and its a pain in the nads I much prefer FF or chrome but need cross browser compatibility, Omirion I'll give that a try and see how I get on although my css skills are limited and I normally end up doing more harm than good lol
  7. Ali25m

    css/php issue

    hey don't know if anyone has come across this issue before. I've updated part of our intranet site and it works a treat, the update querys are fine and the so are the select querys all in all everything is great. However I am having a problem with IE, when I use a .html file to display the page theres no problem but when I save the webpage as a .php the formating won't work in IE. When I say won't work everything is the same only the page is displayed on the far left of the screen and is not centrally aligned. Any help is much apprieciated. P.S I can post the code if required. Cheers Ali pps this is def an IE issue as the page works fine in FF as both .html and .php
  8. Added the ASC to the end of the SQL statement but still no joy, just managed to sort it tho :D had the table field set tp varchar instead of int. Thanks for your help tho
  9. Thanks will give that a try, I did read that it defaulted to ASC which is why I didn't implement it but I'll certainly give it a whirl and let you know.
  10. Hi this is my first post and I'm after a little help if pos. I've created a php based site to query a database and all is working fine, however I can't seem to get my results to order by a set criteria. Any help is much appriciated. p.s I am by no means an expert so any comments/suggestions are welcome. <?php include 'Remoteconnection.php'; error_reporting(0); $error = ""; $d = $_POST['choice']; $m = $_POST['month']; $all = "All"; if ($_POST['hidden']==1) { $sq = "SELECT Date, Month, Time, bookingID, Ptime FROM booking WHERE Date = '$d' and Month = '$m' ORDER BY Date"; $sres = mysql_query($sq) or die(mysql_error()); $count = mysql_num_rows($sres); if ($d == $all) { $nsq = "SELECT Date, Month, Time, bookingID, Ptime FROM booking WHERE Month = '$m' ORDER BY Date"; $sqls = mysql_query($nsq) or die(mysql_error()); $count1 = mysql_num_rows($sqls); } } ?> <?php if (isset($_POST['delete'])) { foreach($_POST['d'] as $id) { $sqld = "DELETE FROM booking WHERE bookingid='$id'"; $result = mysql_query($sqld) or die (mysql_error()); } } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <LINK REL=StyleSheet HREF="search.css" TYPE="text/css" MEDIA=screen> </head> <body> <form method="post" action="http://www.whickhamschool.org/adminSearch.php"> <br/><br/><br/><br/> <label for="choice"><b>Search By Month</b></label> <br/><br/> <label for="Date"><b>Date</b></label> <br/> <br/> <select name="choice"> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> <option>6</option> <option>7</option> <option>8</option> <option>9</option> <option>10</option> <option>11</option> <option>12</option> <option>13</option> <option>14</option> <option>15</option> <option>16</option> <option>17</option> <option>18</option> <option>19</option> <option>20</option> <option>21</option> <option>22</option> <option>23</option> <option>24</option> <option>25</option> <option>26</option> <option>27</option> <option>28</option> <option>29</option> <option>30</option> <option>31</option> <option>All</option> </select> <br/><br/> <label for="Month"><b>Month</b></label> <br/> <br/> <select name="month"> <option>January</option> <option>February</option> <option>March</option> <option>April</option> <option>May</option> <option>June</option> <option>July</option> <option>August</option> <option>September</option> <option>October</option> <option>Novemeber</option> <option>December</option> </select> <br/><br/> <input type="submit" name="submit" value="submit"> <input type="hidden" value="1" name="hidden"> </form> <strong><p>Please note if no data appears below then the bus has not yet been booked!</p></strong> <table width="400" border="0" cellspacing="1" cellpadding="0"> <tr> <td><form name="form1" method="post" action="http://www.whickhamschool.org/adminSearch.php"> <table width="400" border="0" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC"> <tr> <td bgcolor="#FFFFFF"> </td> <td colspan="4" bgcolor="#FFFFFF" ><h1>Bookings</h1></td> </tr> <tr> <td align="center" bgcolor="#FFFFFF">ID</td> <td align="center" bgcolor="#FFFFFF"><strong>Date</strong></td> <td align="center" bgcolor="#FFFFFF"><strong>Month</strong></td> <td align="center" bgcolor="#FFFFFF"><strong>Time</strong></td> <td align="center" bgcolor="#FFFFFF"><strong>Pick up time</strong></td> </tr> <?php if (isset($sqls)) { while ($row2 = mysql_fetch_array($sqls)) { ?> <td align="center" bgcolor="#FFFFFF"><?php echo ' <input type="checkbox" name="d[]" value="' . $row2['bookingID'] . '" />';?></td> <td bgcolor="#FFFFFF"><?php echo $row2[0];?></td> <td bgcolor="#FFFFFF"><?php echo $row2[1];?></td> <td bgcolor="#FFFFFF"><?php echo $row2[2];?></td> <td bgcolor="#FFFFFF"><?php echo $row2[4];?></td> </tr> <?php } } ?> <?php while ($row1 = mysql_fetch_array($sres)) { ?> <td align="center" bgcolor="#FFFFFF"><?php echo '<input type="checkbox" name="d[]" value="' . $row1['bookingID'] . '" />';?></td> <td bgcolor="#FFFFFF"><?php echo $row1[0]; ?></td> <td bgcolor="#FFFFFF"><?php echo $row1[1]; ?></td> <td bgcolor="#FFFFFF"><?php echo $row1[2]; ?></td> <td bgcolor="#FFFFFF"><?php echo $row1[4]; ?></td> </tr> <?php } ?> <tr> <td colspan="5" align="center" bgcolor="#FFFFFF"><input name="delete" type="submit" id="delete" value="Delete" onClick="javascript: return confirm ('Are you sure you wish to delete?')"></td> </tr> </table> </form> </td> </tr> </table> </form> </tr> </table> </div> </div> </body> </html>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.