TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 02-14-2012, 04:19 PM   #1 (permalink)
The Acquainted
 
KingOfTheSouth's Avatar
 
Join Date: Oct 2008
Location: Cincinnati
Posts: 151
Thanks: 14
KingOfTheSouth is on a distinguished road
Default preselect from drop list php

Hey all I have an issue I need some help on. I have two drop down lists in html that are being populated by php. My first drop down is called "IN" and you select a time time then when finished with task you select "OUT" and select the time. It is just like a time-sheet. But Once I get my first "OUT" selection for the day I want the "IN" to be populated by the last "OUT" that was selected. Does this make any sense?
KingOfTheSouth is offline  
Reply With Quote
Old 02-15-2012, 04:07 AM   #2 (permalink)
The Addict
 
tony's Avatar
 
Join Date: Aug 2008
Posts: 336
Thanks: 8
tony is on a distinguished road
Default

That seems more like a javascript would help you on that one. Is that how you are trying to do it or purely in PHP? That could also be done.
tony is offline  
Reply With Quote
Old 02-15-2012, 03:57 PM   #3 (permalink)
The Acquainted
 
KingOfTheSouth's Avatar
 
Join Date: Oct 2008
Location: Cincinnati
Posts: 151
Thanks: 14
KingOfTheSouth is on a distinguished road
Default

JavaScript is what I wanted to do at first, but I suck at JavaScript it is so confusing. I was thinking PHP but didn't know if it could be done like that.
KingOfTheSouth is offline  
Reply With Quote
Old 02-18-2012, 08:21 PM   #4 (permalink)
The Wanderer
 
AxelG's Avatar
 
Join Date: Feb 2012
Posts: 16
Thanks: 0
AxelG is on a distinguished road
Default

There is easy solution in javascript using jQuery. It is more easy and faster to create javascript with jQuery.
AxelG is offline  
Reply With Quote
Old 02-21-2012, 04:03 PM   #5 (permalink)
The Acquainted
 
KingOfTheSouth's Avatar
 
Join Date: Oct 2008
Location: Cincinnati
Posts: 151
Thanks: 14
KingOfTheSouth is on a distinguished road
Default

I am not that good at any JavaScripting I have used JQuery but just stuff from JQuery.com so I don't know it that well.
KingOfTheSouth is offline  
Reply With Quote
Old 03-13-2012, 06:31 PM   #6 (permalink)
The Acquainted
 
KingOfTheSouth's Avatar
 
Join Date: Oct 2008
Location: Cincinnati
Posts: 151
Thanks: 14
KingOfTheSouth is on a distinguished road
Default

I got this figured out. Where is what I did...

PHP Code:
<select name="start">
          <option value="">-Select One-</option>
          <?php
$query 
"SELECT " $tab['timesheet'] . ".stop FROM " $tab['timesheet'] . " WHERE user = " $user['id'] . " ORDER BY  timesheets.stop DESC LIMIT 1";

$result   mysql_fetch_array(mysql_query($query));
$lastTime date("g:i A"strtotime("01/27/2012 " $result['stop']));
$start    date('G'strtotime("01/27/2012"));
$minutes  0;

for (
$i 0$i 96$i++) {
                
$start date("g:i A"strtotime("01/27/2012 + " $minutes " minutes"));
                
?>
          <option value="<?php
                
echo "$start";
?><?php
                
echo ($start == $lastTime) ? "selected" "";
?> >
          <?php
                
echo $start;
?>
         </option>
          <?php
                $minutes 
+= 15;
                
$start date("G"strtotime("01/27/2012 + " $minutes " minutes"));
//$i = 0; $i < 96; $i++
?>
       </select>
KingOfTheSouth is offline  
Reply With Quote
Old 07-19-2012, 08:28 PM   #7 (permalink)
The Visitor
 
Join Date: Jul 2012
Posts: 1
Thanks: 0
chumpaksome is on a distinguished road
Default

JavaScript is what I wanted to do at first, but I suck at JavaScript it is so confusing. I was thinking PHP but didn't know if it could be done like that kind of thing if you want more then Click here for more detail
chumpaksome is offline  
Reply With Quote
Old 07-20-2012, 07:54 PM   #8 (permalink)
The Visitor
 
Join Date: Jul 2012
Posts: 1
Thanks: 0
chinikumy is on a distinguished road
Default

That seems more like a javascript would help you on that one. Is that how you are trying to do it or purely in PHP? That could also be done Payday loans.
chinikumy is offline  
Reply With Quote
Old 07-31-2012, 04:19 AM   #9 (permalink)
The Visitor
 
Join Date: Jul 2012
Location: New York
Posts: 2
Thanks: 0
infoleather is on a distinguished road
Default

How did you attempt to do this, or purely in PHP?
Take full use of the experience about leather jacket mink collar will be helpful to gain knowledge about zipper front leather jacket and also similar

Last edited by infoleather : 08-04-2012 at 05:38 AM.
infoleather is offline  
Reply With Quote
Old 09-04-2012, 01:29 AM   #10 (permalink)
The Visitor
 
Join Date: Sep 2012
Posts: 4
Thanks: 0
mtttt is on a distinguished road
Default

It is more simple and quicker to make javascript with jQuery.

---------
http://www.faucetsuperdeal.com
mtttt is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Beginner Guide #1 Hershey Absolute Beginners 1 11-07-2011 10:42 PM
Free Open Source PHP Projects list Mario2027 Advanced PHP Programming 0 11-10-2010 07:14 AM
php drop down menu Shiag Absolute Beginners 2 07-23-2009 10:08 AM
Should I drop PHP for Java? webosb General 11 04-05-2009 06:58 AM
Large PHP Site List - Post additions AlEast Absolute Beginners 3 04-13-2005 05:10 PM


All times are GMT. The time now is 05:39 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design