Jump to content

Liquid

Members
  • Content Count

    6
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Liquid

  • Rank
    Newbie
  1. Im trying to arrange it so that when i upload an image using a php java script file uploader i wrote the image then becomes a url in a database as ive been reading the benefits of not storing the files in a database if its gonna be a lot of them. what is the code i should use to create a url that is then written to the database.
  2. <?php if ( ! empty( $_POST )) { $con = mysql_connect("localhost","root","NIF123not"); if (!$con) die('Could not connect:' . mysql_error()); mysql_select_db("DSA", $con); mysql_query("INSERT INTO users (username, password) VALUES ('$_POST[username]','$_POST[password]'") or die(mysql_error()); // Retrieve all the data from the "example" table $result = mysql_query("SELECT * FROM users") or die(mysql_error()); // store the record of the "example" table into $row while ($row = mysql_fetch_array( $result )){ // Print out the contents of the entry echo "Username: ".$row['username']; echo "
  3. <?php if ( ! empty( $_POST )) { $con = mysql_connect("localhost","root","*********"); if (!$con) die('Could not connect:' . mysql_error()); mysql_select_db("DSA", $con); mysql_query("INSERT INTO users (username, password) VALUES ('$_POST[username]','$_POST[password]'") or die(mysql_error()); mysql_close($con); // Retrieve all the data from the "example" table $result = mysql_query("SELECT * FROM DSA") or die(mysql_error()); // store the record of the "example" table into $row $row = mysql_fetch_array( $result ); // Print out the contents of the entry echo "Name: ".$
  4. Hi, so im eventually gonna try to compare two user entered dates and determine which is greater then the other, i assume i can just do that part with parse and get the ms since 1970, the part im having difficulty with is take the input from the input boxes and using those as the dates. all the tutorials and information ive found sends it to a server database to get info, i just want to almost turn them into a string. i know how to do this in java, but im lost as to how to do this in javascript.Any help would be appritiated
  5. System.out.println(secret.indexOf(guess));can you take the indexOf of a string with a string.in this case secret is a sting entered by the user and guess is a letter entered by a second user. i want to compare the letter to the word entered and then either print the next stage of the hangman or print the location of the letter in the word
  6. I have to build a private hangman game. Im trying to break it up into parts and the one im stuck on is taking the letter, that the second user entered as his guess and comparing it to the first users secret word string. what i have right now is all jumbled so wont make much sense.Basicly how would you go about looking in a string for a character and then if its found implement a string the draws the letter in.
×
×
  • Create New...