Jump to content

M0n5terBunny

Members
  • Posts

    23
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

M0n5terBunny's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi all, i was wondering how to make a box popup when a new message has appeared in my table i know its javascript for the box but im not sure on how to make popup when theres a new message, any ideas?
  2. i asked it to adjust to the window size as in just the browser window
  3. If possible yeh, I've tried setting the background to a php array with folder contents but that ended up stretching images etc and yes basically thumb nails of the image and when someone hovers over it becomes bigger and when clicked it shows details of that photo.
  4. Hello all, im fairly new, but i have a question that i cant answer. is it possible to use the contents of a folder as a website background as in my pictures folder would be a tile of the same size images as my website background? and if i upload some more photos it automatically updates the background? and it would get gradually smaller as the more pictures came into the folder like 2 pics would be side by side 4 would be one in each corner and 6 and 8 and so forth so basically it sizes them equally so that it fills the page. any ideas ? cheers
  5. <pre># Column Type Collation Attributes Null Default Extra Action 1 name varchar(255) latin1_swedish_ci No None Change Drop More 2 time varchar(4) latin1_swedish_ci No None Change Drop More 3 date date No None Change Drop More 4 issue varchar(255) latin1_swedish_ci No None Change Drop More 5 description varchar(255) latin1_swedish_ci No None Change Drop More 6 booked varchar(255) latin1_swedish_ci No None Change Drop More 7 gsub varchar(3) latin1_swedish_ci No None Change Drop More 8 time_added varchar(255) latin1_swedish_ci No None Change Drop More 9 date_added varchar(255) latin1_swedish_ci No None Change Drop More
  6. this is the only script thats messing up the connection file is solid i have 6 other scripts that work off it and im having no problem with them i have another insert file that inserts users with an md5 password setup and thats working fine
  7. i usually ask it to redirect to a page with a loading image as in a gif on a loop and then when the upload is done echo upload done. and then head back to the upload form
  8. Yeh i understand the Function POST , i have tidied up to make it easier to understand. form - insert.php <form method="post" action="insert_proc.php"> First Name<input type="text" name="fname"/> Last Name<input type="text" name="lname"/> Age<input type="text" name="age"/> <input type="submit" value="Submit"/> inser_proc.php <?php include('include/connection.inc'); $name = $_POST['fname']; $lname = $_POST['lname']; $age = $_POST['age']; $sql = mysql_query("SELECT * FROM table_1 WHERE age='$age'"); if (mysql_num_rows($sql) != 1) { echo "booked"; } else { $sql2 = mysql_query("INSERT INTO table_1 (name,lastname,age) VALUES ('$name','$lname','$age')"); } ?> but yet even in simple form and erasing all the entries so the db is blank it echo's booked and wont book it even when there is nothing there.
  9. <form name="myForm" action="insert_proc.php" onsubmit="return validateForm()" method="post"> <tr> <td>First Name </td> <td> <input type="text" name="fname"/></td> </tr> <tr> <td>Last Name </td> <td> <input type="text" name="lname"/></td> </tr> <tr> <td>Age </td> <td> <input type="text" name="age"/></td> </tr> <tr> <td>Date </td> <td> <input type="text" name="date"/></td> </tr> <tr> <td>Time </td> <td> <input type="text" name="time"/></td> </tr> <tr> <td> </td> <td> <input type="submit" value="Submit"/></td> </tr> </form>
  10. nope still giving blank areas in the table
  11. Would that work ? i have tried it and it puts in blank fields in my table include('include/connection.inc'); $name = $_POST['name']; $lname = $_POST['lastname']; $date = $_POST['date']; $time = $_POST['time']; if (!mysql_num_rows($sql) == 1) {echo "booked";} else { $sql2; } $sql2 = mysql_query("INSERT INTO table_1 (name,lastname,age) VALUES ('$name','$lname','$age')"); $sql = mysql_query("SELECT * FROM table_1 WHERE date='$date' AND time='$time'; ");
  12. what would be the code for that mysql_query(INSERT INTO client (name,time,date) VALUES (test,1400,2011/10/29); if mysql_query == 1 {echo booked } else { do mysql_query }; ?
  13. hello, i have a booking form that allows people to book appointments from 0900 to 1800 with 30 min intervals 0900,0930,1000 etc and i was wondering if there is some php code out there that will stop people from booking an appointment at a time that is already booked. any ideas ? cheers
  14. Hello all for some reason when i do this code it puts and extra 2 list items at the bottom i have tried putting echo = "<ul>"; at the start and </ul> but it just comes back with a server error, is there any way to fix this? also can your shorten this as in ask it to repeat the same query for each time? . <?php include('include/connection.inc'); $c = "<li>unavailable - "; $o = "<li>available - "; $date = date("Y/m/d"); /////// $v1 = mysql_query("SELECT * FROM client WHERE date = '$date' AND time = 900"); if (mysql_num_rows($v1) == 1) { echo "0900",$c; } else { echo "0900",$o; } $v2 = mysql_query("SELECT * FROM client WHERE date = '$date' AND time = 930"); if (mysql_num_rows($v2) == 1) { echo "0930",$c; } else { echo "0930",$o; } $v3 = mysql_query("SELECT * FROM client WHERE date = '$date' AND time = 1000"); if (mysql_num_rows($v3) == 1) { echo "1000",$c; } else { echo "1000",$o; } $v4 = mysql_query("SELECT * FROM client WHERE date = '$date' AND time = 1030"); if (mysql_num_rows($v4) == 1) { echo "1030",$c; } else { echo "1030",$o; } $v5 = mysql_query("SELECT * FROM client WHERE date = '$date' AND time = 1100"); if (mysql_num_rows($v5) == 1) { echo "1100",$c; } else { echo "1100",$o; } $v6 = mysql_query("SELECT * FROM client WHERE date = '$date' AND time = 1130"); if (mysql_num_rows($v6) == 1) { echo "1130",$c; } else { echo "1130",$o; } $v7 = mysql_query("SELECT * FROM client WHERE date = '$date' AND time = 1200"); if (mysql_num_rows($v7) == 1) { echo "1200",$c; } else { echo "1200",$o; } $v8 = mysql_query("SELECT * FROM client WHERE date = '$date' AND time = 1230"); if (mysql_num_rows($v8) == 1) { echo "1230",$c; } else { echo "1230",$o; } $v9 = mysql_query("SELECT * FROM client WHERE date = '$date' AND time = 1300"); if (mysql_num_rows($v9) == 1) { echo "1230",$c; } else { echo "1300",$o; } $v10 = mysql_query("SELECT * FROM client WHERE date = '$date' AND time = 1330"); if (mysql_num_rows($v10) == 1) { echo "1330",$c; } else { echo "1330",$o; } $v11 = mysql_query("SELECT * FROM client WHERE date = '$date' AND time = 1400"); if (mysql_num_rows($v11) == 1) { echo "1400",$c; } else { echo "1400",$o; } $v12 = mysql_query("SELECT * FROM client WHERE date = '$date' AND time = 1430"); if (mysql_num_rows($v12) == 1) { echo "1430",$c; } else { echo "1430",$o; } $v13 = mysql_query("SELECT * FROM client WHERE date = '$date' AND time = 1500"); if (mysql_num_rows($v13) == 1) { echo "1500",$c; } else { echo "1500",$o; } $v14 = mysql_query("SELECT * FROM client WHERE date = '$date' AND time = 1530"); if (mysql_num_rows($v14) == 1) { echo "1530",$c; } else { echo "1530",$o; } $v15 = mysql_query("SELECT * FROM client WHERE date = '$date' AND time = 1600"); if (mysql_num_rows($v15) == 1) { echo "1600",$c; } else { echo "1600",$o; } $v16 = mysql_query("SELECT * FROM client WHERE date = '$date' AND time = 1630"); if (mysql_num_rows($v16) == 1) { echo "1630",$c; } else { echo "1630",$o; } $v17 = mysql_query("SELECT * FROM client WHERE date = '$date' AND time = 1700"); if (mysql_num_rows($v17) == 1) { echo "1700",$c; } else { echo "1700",$o; } $v18 = mysql_query("SELECT * FROM client WHERE date = '$date' AND time = 1730"); if (mysql_num_rows($v18) == 1) { echo "1730",$c; } else { echo "1730",$o; } $v19 = mysql_query("SELECT * FROM client WHERE date = '$date' AND time = 1800"); if (mysql_num_rows($v19) == 1) { echo "1800",$c; } else { echo "1800",$o; } /////// ?>
×
×
  • 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.