- Upvotes Received
- 3
- Posts with Upvotes
- 2
- Upvoting Members
- 3
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
7 Posted Topics
Re: [CODE] <form action="yourpostedtopage.php" method="post"> <select name="yourselectbox" id="yourselectbox"> <option value="something1">Option 1</option> <option>Option 2</option> </select> <input name="submitbutton" type="submit" value="submit" /> </form> [/CODE] yourpostedtopage.php [CODE=php] ... $selectedoption = $_POST['yourselectbox']; ... echo $selectedoption; mysql_query(".... WHERE column = '$selectedoption' ... ") ... [/CODE] something like that? | |
Re: [CODE] // 1) Im not sure im following you but im thinking this... $timestamp = $row['uptime']; echo date("m-d-y h:i a",$timestamp); // 2) $select = ("SELECT * FROM photo_albums ORDER BY uptime ASC LIMIT 3"); // or whatever amount [/CODE] | |
ok, So Im very new to this whole AJAX kind of thinking, and I might be trying to do something that's either harder than it needs to be, or theres an easier way that I havent fount yet... I'm trying to make a generic javascript function to call php functions.... … | |
Re: [CODE=php] <?php $now = time(); echo date("m/d/y h:i a", $now); ?> [/CODE] I would definitely look up the time() function and date() function to get everything formatted the way you want it. time "returns the current time measured in the number of seconds since the Unix Epoch" and is dependent … | |
Re: [CODE=php] // EMPTY FIELD CHECK if( (empty($name)) || (empty($address)) || (and so on) ) { echo '<script>alert("The name and address fields are required.");</script>'; echo '<script>history.back(1);</script>'; exit; } /* EMPTY FIELD CHECK */ [/CODE] That would work once the form is submitted... if you want to check that the fields are … | |
Re: Is this what your looking for?? firstpage.php [CODE] <a href="www.yoursite.com/form.php?id=<?php echo "123456789"; ?>">link to the form</a> [/CODE] form.php [CODE=php] if(isset($_GET['id'])) { // would echo 123456789 $id = $_GET['id']; echo $id; } [/CODE] | |
Re: Might need a bit more info, but does this help? [code=php] echo "Uploaded file name: " . $_FILES["file"]["name"] . "<br />"; echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />"; [/code] |
The End.