Jump to content

01hanstu

Members
  • Posts

    95
  • Joined

  • Last visited

    Never

Everything posted by 01hanstu

  1. Hi, Hope you can help. I am trying to use PHP switch to make the navigation cleaner. So far i have the code and when i try to access the switch command in the address bar it don't work i.e. http://site.co.uk/index.php?page=home. <?php //set page name //$page = "home"; switch ($page) { case "home": include("imgdefault.php"); break; case "pr_arrangement": include("imgprint.php"); break; case "web_overview": include("imgweb.php"); break; } ?> And it wont work. I have deliberately commented the variable $Page so i can access it through the address bae
  2. We have a booking system and we are trying to get it so that if you select the room then you will be able to see information about the room. the following is from the booking system if (isset($_POST['selectroom'])) {$_SESSION['room'] = $_POST['selectroom'];} if (!isset($_SESSION['room'])) $room = "C08"; else $room = $_SESSION['room']; Then my new bit of code is: if ($room='C08') print "ICT Suite with 29 RM One Computers."; else print "No details are available for this room yet."; But it keeps using the variable at the top (in bold). Please Help
  3. Hi, I am wonder if someone can help. I want to be able to complete a form, the submit it and all of the information will save in a settings.php file. i.e. company_txt (text field) will save to variable $Company which is set as empty in the setting.php file will look like this (below) just empty until the form has been completed. <?php &company = ""; &var1= ""; &var2= ""; &var3= ""; ?> Thanks Stuart
  4. Hi, Is there a way of being able to manage users through php i.e. change passwords add to groups, disable account? any ideas 01hanstu
  5. Hi, Not too worried if it is not a word document. The problem is that i need to create a fixed document of any type, that will automatically put the data on the page, as people will just modify the form, so that the form can be printed and used. Is this just stupid? Thanks Stuart
  6. Hi, We currently have in place a helpdesk solution intergrated into our intranet, Users are able to login and place a call/Ticket. What i want to know is if we are able to click on a button in the admin side of the system saying print job sheet, and it will print a job sheet that have been made in word, and fill in the form details from mysql to the word automatically Thanks Stu
  7. Hi, This is looking Promising, but i have an error and cant get rid of it My Connect.php is as follows: <?php $hostname = "xx.xx.xx.xx"; $database = "db_name"; $username = "u_name"; $password = "p_word"; $conn= mysql_connect($hostname, $username, $password) or trigger_error(mysql_error(),E_USER_ERROR); ?> But i get an error saying "No database selected" Can you help Thanks Stuart
  8. Hi, Thanks again, I Guess i could simply rename the csv file to suit when its emailed to me. and copy it to the web directory the run the script. Are you able to show me how, using a fixed name, to fill the textfield from a csv and if you can show me one i can try to replicate it to do them all (Bit of copy N paste) Thanks - Stuart
  9. Hi nuttycoder, Thanks for the reply. Had a look at the site. The problem I have is that the name of the csv is always a different name as its generated by the MIS Server, So how would you add a "Browse" Button. Thanks nuttycoder, Stuart.
  10. Brilliant Thats worked Thanks a lot knsito
  11. Hi, I have a booking system incorporate into our intranet. The problem is that we have to manually time the names of the teachers in the fields then the class names. My idea is to utilise the MIS Server we have and do an export of the room timetables and then when we open the manage timetable page we can click on import csv the point to where it is then it will put the data onto the form the we can just click submit. Is this possible? Thanks Stuart
  12. Hi, Do you have the pages on more than 1 pc or are the stored on 1 server and the computer looks at the server for the the pages?? Thanks Stuart
  13. Hi, There error code indicates that the network connection has been refused. You should check that there is a MySQL server running, that it has network connections enabled, and that the network port you specified is the one configured on the server. Also check the firewall. Thanks Stu
  14. Hi, Could you try to put the servers IP in the config file? Thanks
  15. Hi, as it stands my code gets results from the news table and 'echo's' them on the page. I Have an image that prints with the message but what i want to know is, is it possible to to have the image print depending on the results of the 'severity column' so then the messages appear an appropriate image is shown so people know the severity? ATM My DB has 5 columns: ID, TITLE, MESSAGE, USER and SEV, but im unure how to bind the SEV column to images can anyone help. My code is at the bottom if it help Thanks Stuart <?php include ('inc/connect.php'); mysql_select_db($data_conn) or die( "Unable to select database"); $result = mysql_query("SELECT * FROM News"); while($row = mysql_fetch_array($result)) { echo "<img src=\"images/warning_32.png\" />"; echo "<B>"; echo $row['Title'] . " <br /></b>" . $row['Message'] . "</p><br />" ; } ?>
  16. Hi, Our Intranet is in need of a KB. Something Simple that we can modify to suit our needs, it only need to be basic and Free! and have the abiliy to search for articles Can anyone Recommend one? Thanks Stuart
  17. Hi, Does anyone know where i can find a PHP+MYSQL Login Solution that has the following for free: o User Required to Login first o User Can manage there own details i.e. Password/Name ... o have a remember me feature o IF admin you can manage all users Anyone Help? Thanks
  18. Hi, i have a List/Menu object on my php form. What is does at the minute is the user selects the room that they want to view, then they have to clock go. I need this to happen automatically, can this be done? My Current code <form name="roomform" method="post" action="bookingindex.php?week=<? print $mondaythisinstance ?>"> <select name="selectroom" class="formnames"> <option value=" <?PHP print $room ?>" selected>Selected: <?PHP print $room ?></option> <option value="">- - - - - - - - - - -</option> <? while ($loop < $getroomcount) { print"<option value=\"".mysql_result($getroomresults,$loop,"roomname")."\">".mysql_result($getroomresults,$loop,"roomname")."</option>"; $loop ++; } ?> </select> <input name="Submit" type="submit" class="formnames" value="Go"> </div> </form> Then once go is clicked it shows the timetable for the room Hope you can help Stuart
  19. Hi, thanks for all of your replies. dawsba i have tried your and have had no luck it is not navigation to the select. Any more advise would be brilliant Stuart
  20. Hi, sorry what i mean by automatic is that when the user selects an item from the list is takes them to the link (getting rid of the go button). So for example if a user selects google from the dropdown it will take them to google and they don't have to press go.
  21. Hi, i have a dropdown box that is populated. The user has to click go and i would like it to navigate automatically. My code populates the information from MySql <? $getroomsquery = "SELECT * from rooms"; $getroomresults = mysql_query($getroomsquery); $getroomcount = mysql_num_rows($getroomresults); $loop = 0; ?> <form name="roomform" method="post" action="bookingindex.php?week=<? print $mondaythisinstance ?>"> <select name="selectroom" class="formnames"> <option value=" <?PHP print $room ?>" selected>Selected: <?PHP print $room ?></option> <option value="">- - - - - - - - - - -</option> <? while ($loop < $getroomcount) { print"<option value=\"".mysql_result($getroomresults,$loop,"roomname")."\">".mysql_result($getroomresults,$loop,"roomname")."</option>"; $loop ++; } ?> I would like to know how i can change this so it will become automated. Help is appreciated Stuart
  22. Hi hope you can help. In a nutshell i have a booking system where people logon, book a room and use the room simple. Now we have meeting rooms that are booked hourly whereas the classrooms a period based. What i want to know is how i can have something along the lines of Normally its: Select * from rooms and using the while command for the 5 periods $i = 1; while ($i < 6) { Now we need it to do both 6 periods but only for specific rooms. i.e. if the room selected is "Triage" then $i = 1; while($i < 7 { ... ___________________________________________________ i have tried the following: If ($room=='Triage') print"<td><div align=\"center\">".mysql_result($result,0,"mon$i"); print "<br /><br />". mysql_result($result,0,"monclass$i"); print "</div></td>"; HELP IS REALLY APPRECIATED Stuart
  23. Hi, Thanks for that russell great help my system is now getting better Many thanks Stuart
  24. HI, my intranet is running and we are looking to update the existing system with a few features. Every user on the system can login and make whats called a "Support Request" With that we take information and have it put into a mysql database and also an email. The current script we use is below showing the information for that specific user. <? include ('nav.php'); //Our Navigation System include ('getlogon.php'); //Username authentication Through IIS + Domain include ('connect.php'); //Connection to MYSQL Database. mysql_select_db($database_lmconnect) or die( "Unable to select database"); $query = "SELECT * FROM jobs WHERE '$logon_name' = name and '0' = isopen"; $result = (mysql_query($query)); $num = mysql_num_rows($result); ?> THIS IS THE BIT THAT ACTUALLY GETS THE LIST OF CALLS THEY LOGGED ON THE SYSTEM. <? $i=0; while ($i < $num) { if ($i == 0){print "<span class=\"datehead\">Your Old Calls logged with us:</span><br /> ";} $jobnumber=mysql_result($result,$i,"jobnumber"); $machine=mysql_result($result,$i,"machine"); $network=mysql_result($result,$i,"network"); $date=mysql_result($result,$i,"date"); $description=mysql_result($result,$i,"description"); $today = time(); $date = strtotime($date); $difference = $today - $date; $action=mysql_result($result,$i,"actiontaken"); print "<span class=\"darkgreen\">Jobnumber:</span> $jobnumber &nbsp&nbsp&nbsp "; print "<span class=\"darkgreen\"> Issue with:</span> $machine &nbsp&nbsp "; print "<span class=\"darkgreen\"> Solution: </span> $action <br />&nbsp&nbsp <br /><br />"; $i++; } mysql_close();?> What i need to know is how i can carry over the jobnumber onto a new page and it show the details of the call, all i seem to get is an error about the call number Hope this helps Stuart
×
×
  • 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.