HTML - Php Mysql Connection
<html>
<?php $con = @mysql_connect("localhost", "root", "password"); if (!$con) { echo( "<P>Unable to connect to the " . "database server at this time.</P>" ); exit(); } ?> </html> Why do I receive "the page cannot be displayed"? Is there an error in this coding? Should it not at least say "Unable to connect to the..." as I meant for it to do if it could not connect to the server? (My .html file is calling this .php file, I checked.) Similar TutorialsI have a website for my company, and at the bottom I have a clickable button which gives access to "resources" such as manuals and diagrams which is only accessible with a username and password. I would like to add a button that automatically opens the remote desktop connection tool (mstsc) on the users machine, and ideally ammend some of the default settings of this (drives, sounds etc). I have no idea if this is even possible! Any pointers (or a simple NO!) would be great! Greetings, I have a script that needs to load a ~250Mb file from an FTP server in order to function. During this 20+ minute process, the connection between the server and client is lost; is there a header I can use to make sure the connection does not timeout? Thank you and Godspeed! I have two dynamic, dependant dropdown lists. DropdownList2 is going to be populated based on the dropdownlist1 option selected. I already know how to do it. The second dropdown list is needs to get the data from oracle table connection. And I do not know how to do it this using a java script function. THANKS A LOT! What I have is: <script language="JavaScript"> function PopulateList2() { Help needed here to populate my ListNumber 2 depending of the List Number 1 option selected. Options are in oracle table. } <tr> <td> <select onchange="populatelist2();" class="searchtext" name="list1" > <option selected value="">Select list1 ----Populating list1 here using oracle data connection---- </select> <select class="searchtext" name="List2" > <option value="">Select List2 </select> </td> </tr> Hi, This is a little difficult to explain but here goes. I have a form on my website which allow users to insert insect species they've recorded into a mysql database. Everything works fine, but one feature I would like to add is, instead of submitting the form for each species in a list, allow the user to go through their list and then clicking 'Add' to add them to a list on the screen, once complete they can click submit on the form and the entire list is added to the database in one submission. Is this possible and if so could someone please help. This would be a great feature for my site and make it much more user friendly. Many Thanks Simon Hi all. I have a problem with forms I could use some help with. Here is how I want the section of it I am having problems with to look. Code: <input type="select" name="inst1img"> <option value="NULL" selected>None</option> <option value="<img src="http://www.****.com/images/arrowlr.gif">">Left/Right arrows </option> <option value="<img src="http://www.****.com/images/arrowud.gif">">Up/Down Arrows </option> </select> and so on and so forth. The point of this is, I have a game site and I am making a php/html admin section to quickly add games and their instructions to the site. However, when I use a code like shown above, the form is screwed up and it shows the images in the middle of it. Can anyone suggest some way I might be able to get this to work? The best I could come up with so far is to use a text box input, and leave out all the html elements, such as the <img src=" and just fill that in each time, but as you can immagine, that is BEYOND a pain in the rear. The other thing is, when this data is put through to mysql database, it has to show up as perfect html otherwise it won't work right on the page when I include it. Thank you in advance! Jax2 Hi, Im very new to php and mysql coding. Im trying to make support system for a basketball fantasy website where it predicts the player's next games fantasy pts. The tables consists of a number of columns; Game, OFF, DEF, REB, AST, STL, BLK, TO, PF and PTS. There is a number of rows that contains the values of these columns. I want to write some code that takes these values and multiple them with a value and add them to next column. So it like formula for example; Game|OFF|DEF|REB|AST|STL|BLK|TO|PF|PTS 1 | 1 | 0 | 2 | 1 | 3 | 1 | 0 | 2 | 6 2 | 2 | 0 | 2 | 1 | 3 | 1 | 0 | 2 | 6 The Formula would be (OFF *0.5) + (DEF*0.5) etc and place the result in column called FantasyPTS. So the resulting table would be like this; Game|OFF|DEF|REB|AST|STL|BLK|TO|PF|PTS |FantasyPTS 1 | 1 | 0 | 2 | 1 | 3 | 1 | 0 | 2 | 6 | ? 2 | 2 | 0 | 2 | 1 | 3 | 1 | 0 | 2 | 6 | ? Thank you in advance |