Go Back   Forum Care Forums > Development Reference Area > Php Development

Reply
 
LinkBack Thread Tools Display Modes
time or date picker ?
Old
  (#1)
Alain Roger
Guest
 
Posts: n/a
Default time or date picker ? - 05-14-2007, 03:54 AM

Hi,

I've already seen some webpages which include a time or date picker (like a
calendar) written in PHP and on which user could type the year and after,
select the month and date (using month).
I'm looking for something like that.

Where can i find one for free ?

thanks

--
Alain
------------------------------------
Windows XP SP2
PostgreSQL 8.1.4
Apache 2.0.58
PHP 5

   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: [PHP] time or date picker ?
Old
  (#2)
Tijnema !
Guest
 
Posts: n/a
Default Re: [PHP] time or date picker ? - 05-14-2007, 03:54 AM

On 3/19/07, Alain Roger <EMAIL REMOVED> wrote:
> Hi,
>
> I've already seen some webpages which include a time or date picker (like a
> calendar) written in PHP and on which user could type the year and after,
> select the month and date (using month).
> I'm looking for something like that.
>
> Where can i find one for free ?
>
> thanks
>
> --
> Alain


This is client side.... PHP is server side...

Go to the javascript list.

Tijnema

> ------------------------------------
> Windows XP SP2
> PostgreSQL 8.1.4
> Apache 2.0.58
> PHP 5
>

   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: time or date picker ?
Old
  (#3)
Manuel Lemos
Guest
 
Posts: n/a
Default Re: time or date picker ? - 05-14-2007, 03:54 AM

Hello,

on 03/19/2007 04:11 PM Alain Roger said the following:
> Hi,
>
> I've already seen some webpages which include a time or date picker (like a
> calendar) written in PHP and on which user could type the year and after,
> select the month and date (using month).
> I'm looking for something like that.
>
> Where can i find one for free ?


You may want to take a look at this forms generation cl*** that comes
with a plug-in precisely for what you ask.

http://www.phpcl***es.org/formsgeneration

Here you can see a live example of what date picker:

http://www.meta-language.net/forms-e...est_date_input

Here you can watch a tutorial video with a section that explains about
this plug-in:

http://www.phpcl***es.org/browse/vid...ugin-date.html

--

Regards,
Manuel Lemos

Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/

PHP Cl***es - Free ready to use OOP components written in PHP
http://www.phpcl***es.org/
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: time or date picker ?
Old
  (#4)
Moot
Guest
 
Posts: n/a
Default Re: time or date picker ? - 05-14-2007, 03:54 AM

On Mar 19, 3:11 pm, raf.n...@gmail.com ("Alain Roger") wrote:
> Hi,
>
> I've already seen some webpages which include a time or date picker (like a
> calendar) written in PHP and on which user could type the year and after,
> select the month and date (using month).
> I'm looking for something like that.
>
> Where can i find one for free ?
>


This is a javascript question, so you may get more info in a
javascript-centric list.

But that aside, I'm a fan of the Yahoo User Interface library. This
may do what you're looking for:
http://developer.yahoo.com/yui/calendar/

   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: [PHP] time or date picker ?
Old
  (#5)
Richard Lynch
Guest
 
Posts: n/a
Default Re: [PHP] time or date picker ? - 05-14-2007, 03:54 AM

On Mon, March 19, 2007 2:11 pm, Alain Roger wrote:
> I've already seen some webpages which include a time or date picker
> (like a
> calendar) written in PHP and on which user could type the year and
> after,
> select the month and date (using month).
> I'm looking for something like that.
>
> Where can i find one for free ?


Actually, you haven't seen that.

You thought you saw that, because the URL ended in .php

But what you really saw was some JavaScript.

--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: [PHP] time or date picker ?
Old
  (#6)
tedd
Guest
 
Posts: n/a
Default Re: [PHP] time or date picker ? - 05-14-2007, 03:55 AM

At 8:11 PM +0100 3/19/07, Alain Roger wrote:
>Hi,
>
>I've already seen some webpages which include a time or date picker (like a
>calendar) written in PHP and on which user could type the year and after,
>select the month and date (using month).
>I'm looking for something like that.
>
>Where can i find one for free ?
>
>thanks
>
>--
>Alain


Alain:

You can choose -- php, flash, or javascript.

http://xn--nvg.com/calendar

Let me know which one you want.

tedd

ps: If you can't read the above url, get opera.
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Problem with MySQL
Old
  (#7)
Unknown Sender
Guest
 
Posts: n/a
Default Problem with MySQL - 05-14-2007, 03:55 AM

Hello !
I have problem with access in mysql

it is my code:
<html>
<head><title>SQL Query Sender</title></head>
<body>
<?php
$host="";
$user="";
$p***word="";
/* Section that executes query */
if(@$_GET['form'] == "yes")
{
mysql_connect($host,$user,$p***word);
mysql_select_db($_POST['database']);
$query = stripSlashes($_POST['query']);
$result = mysql_query($query);
echo "Database Selected: <b>{$_POST['database']}</b><br>
Query: <b>$query</b><h3>Results</h3><hr>";
if($result == 0)
echo "<b>Error ".mysql_errno().": ".mysql_error().
"</b>";
elseif (@mysql_num_rows($result) == 0)
echo("<b>Query completed. No results returned.
</b><br>");
else
{
echo "<table border='1'>
<thead>
<tr>";
for($i = 0;$i < mysql_num_fields($result);$i++)
{
echo "<th>".mysql_field_name($result,$i).
"</th>";
}
echo " </tr>
</thead>
<tbody>";
for ($i = 0; $i < mysql_num_rows($result); $i++)
{
echo "<tr>";
$row = mysql_fetch_row($result);
for($j = 0;$j<mysql_num_fields($result);$j++)
{
echo("<td>" . $row[$j] . "</td>");
}
echo "</tr>";
}
echo "</tbody>
</table>";
} //end else
echo "
<hr><br>
<form action=\"{$_SERVER['PHP_SELF']}\" method=\"POST\">
<input type='hidden' name='query' value='$query'>
<input type='hidden' name='database'
value={$_POST['database']}>
<input type='submit' name=\"queryButton\"
value=\"New Query\">
<input type='submit' name=\"queryButton\"
value=\"Edit Query\">
</form>";
unset($form);
exit();
} // endif form=yes
/* Section that requests user input of query */
@$query=stripSlashes($_POST['query']);
if (@$_POST['queryButton'] != "Edit Query")
{
$query = " ";
}
?>
<form action="<?php echo $_SERVER['PHP_SELF'] ?>?form=yes"
method="POST">
<table>
<tr>
<td align=right><b>Type in database name</b></td>
<td><input type="text" name="database"
value=<?php echo @$_POST['database'] ?> ></td>
</tr>
<tr>
<td align="right" valign="top">
<b>Type in SQL query</b></td>
<td><textarea name="query" cols="60"
rows="10"><?php echo $query ?></textarea>
</td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit"
value="Submit Query"></td>
</tr>
</table>
</form>
</body></html>

when i'm trying to execute it. such message appears:
"Warning: mysql_connect(): Access denied for user 'ODBC'@'localhost' (using p***word: NO) in z:\home\localhost\www\2.php on line 11

Warning: mysql_select_db(): Access denied for user 'ODBC'@'localhost' (using p***word: NO) in z:\home\localhost\www\2.php on line 12

Warning: mysql_select_db(): A link to the server could not be established in z:\home\localhost\www\2.php on line 12

Warning: mysql_query(): Access denied for user 'ODBC'@'localhost' (using p***word: NO) in z:\home\localhost\www\2.php on line 14

Warning: mysql_query(): A link to the server could not be established in z:\home\localhost\www\2.php on line 14
Database Selected: i"

what does it' mean?

--
Best regards,
Pavel private.php?do=newpm&u=
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: [PHP] Problem with MySQL
Old
  (#8)
Guest
Guest
 
Posts: n/a
Default Re: [PHP] Problem with MySQL - 05-14-2007, 03:55 AM

2007. 03. 20, kedd keltezéssel 15.09-kor Pavel Kaznarskiy ezt ÃÂ*rta:
> Hello !
> I have problem with access in mysql
>
> it is my code:
> <html>
> <head><title>SQL Query Sender</title></head>
> <body>
> <?php
> $host="";
> $user="";
> $p***word="";
> /* Section that executes query */
> if(@$_GET['form'] == "yes")


what do you want with that '@' here?
that operator can be used to suppress error messages when calling
functions but not when using a variable

> {
> mysql_connect($host,$user,$p***word);
> mysql_select_db($_POST['database']);
> $query = stripSlashes($_POST['query']);


you should take care of sql injection, check those $_POST values first!

> $result = mysql_query($query);
> echo "Database Selected: <b>{$_POST['database']}</b><br>
> Query: <b>$query</b><h3>Results</h3><hr>";
> if($result == 0)


if you want to check for errors, you should use
if ($result === FALSE)

> echo "<b>Error ".mysql_errno().": ".mysql_error().
> "</b>";
> elseif (@mysql_num_rows($result) == 0)
> echo("<b>Query completed. No results returned.
> </b><br>");
> else
> {
> echo "<table border='1'>
> <thead>
> <tr>";
> for($i = 0;$i < mysql_num_fields($result);$i++)
> {
> echo "<th>".mysql_field_name($result,$i).
> "</th>";
> }
> echo " </tr>
> </thead>
> <tbody>";
> for ($i = 0; $i < mysql_num_rows($result); $i++)
> {
> echo "<tr>";
> $row = mysql_fetch_row($result);
> for($j = 0;$j<mysql_num_fields($result);$j++)
> {
> echo("<td>" . $row[$j] . "</td>");
> }
> echo "</tr>";
> }
> echo "</tbody>
> </table>";
> } //end else
> echo "
> <hr><br>
> <form action=\"{$_SERVER['PHP_SELF']}\" method=\"POST\">


putting $_SERVER['PHP_SELF'] here might also be a security risk
read this:
http://blog.phpdoc.info/archives/13-XSS-Woes.html

> <input type='hidden' name='query' value='$query'>
> <input type='hidden' name='database'
> value={$_POST['database']}>
> <input type='submit' name=\"queryButton\"
> value=\"New Query\">
> <input type='submit' name=\"queryButton\"
> value=\"Edit Query\">
> </form>";
> unset($form);
> exit();
> } // endif form=yes
> /* Section that requests user input of query */
> @$query=stripSlashes($_POST['query']);
> if (@$_POST['queryButton'] != "Edit Query")
> {
> $query = " ";
> }
> ?>
> <form action="<?php echo $_SERVER['PHP_SELF'] ?>?form=yes"
> method="POST">
> <table>
> <tr>
> <td align=right><b>Type in database name</b></td>
> <td><input type="text" name="database"
> value=<?php echo @$_POST['database'] ?> ></td>
> </tr>
> <tr>
> <td align="right" valign="top">
> <b>Type in SQL query</b></td>
> <td><textarea name="query" cols="60"
> rows="10"><?php echo $query ?></textarea>
> </td>
> </tr>
> <tr>
> <td colspan="2" align="center"><input type="submit"
> value="Submit Query"></td>
> </tr>
> </table>
> </form>
> </body></html>
>
> when i'm trying to execute it. such message appears:
> "Warning: mysql_connect(): Access denied for user 'ODBC'@'localhost' (using p***word: NO) in z:\home\localhost\www\2.php on line 11
>
> Warning: mysql_select_db(): Access denied for user 'ODBC'@'localhost' (using p***word: NO) in z:\home\localhost\www\2.php on line 12
>
> Warning: mysql_select_db(): A link to the server could not be established in z:\home\localhost\www\2.php on line 12
>
> Warning: mysql_query(): Access denied for user 'ODBC'@'localhost' (using p***word: NO) in z:\home\localhost\www\2.php on line 14
>
> Warning: mysql_query(): A link to the server could not be established in z:\home\localhost\www\2.php on line 14
> Database Selected: i"
>
> what does it' mean?


these errors mean that your mysql user 'ODBC' has no p***word, while you
are providing a p***word when connecting.
it is not recommended to have a user without p***word, so you should
first give him a p***word with the mysql command "SET P***WORD" or
something

greets
Zoltán Németh

>
> --
> Best regards,
> Pavel private.php?do=newpm&u=
>

   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: [PHP] Problem with MySQL
Old
  (#9)
Tijnema !
Guest
 
Posts: n/a
Default Re: [PHP] Problem with MySQL - 05-14-2007, 03:55 AM

On 3/20/07, Pavel Kaznarskiy <EMAIL REMOVED> wrote:
> Hello !
> I have problem with access in mysql
>
> it is my code:
> <html>
> <head><title>SQL Query Sender</title></head>
> <body>
> <?php
> $host="";
> $user="";
> $p***word="";
> /* Section that executes query */
> if(@$_GET['form'] == "yes")
> {
> mysql_connect($host,$user,$p***word);
> mysql_select_db($_POST['database']);
> $query = stripSlashes($_POST['query']);
> $result = mysql_query($query);
> echo "Database Selected: <b>{$_POST['database']}</b><br>
> Query: <b>$query</b><h3>Results</h3><hr>";
> if($result == 0)
> echo "<b>Error ".mysql_errno().": ".mysql_error().
> "</b>";
> elseif (@mysql_num_rows($result) == 0)
> echo("<b>Query completed. No results returned.
> </b><br>");
> else
> {
> echo "<table border='1'>
> <thead>
> <tr>";
> for($i = 0;$i < mysql_num_fields($result);$i++)
> {
> echo "<th>".mysql_field_name($result,$i).
> "</th>";
> }
> echo " </tr>
> </thead>
> <tbody>";
> for ($i = 0; $i < mysql_num_rows($result); $i++)
> {
> echo "<tr>";
> $row = mysql_fetch_row($result);
> for($j = 0;$j<mysql_num_fields($result);$j++)
> {
> echo("<td>" . $row[$j] . "</td>");
> }
> echo "</tr>";
> }
> echo "</tbody>
> </table>";
> } //end else
> echo "
> <hr><br>
> <form action=\"{$_SERVER['PHP_SELF']}\" method=\"POST\">
> <input type='hidden' name='query' value='$query'>
> <input type='hidden' name='database'
> value={$_POST['database']}>
> <input type='submit' name=\"queryButton\"
> value=\"New Query\">
> <input type='submit' name=\"queryButton\"
> value=\"Edit Query\">
> </form>";
> unset($form);
> exit();
> } // endif form=yes
> /* Section that requests user input of query */
> @$query=stripSlashes($_POST['query']);
> if (@$_POST['queryButton'] != "Edit Query")
> {
> $query = " ";
> }
> ?>
> <form action="<?php echo $_SERVER['PHP_SELF'] ?>?form=yes"
> method="POST">
> <table>
> <tr>
> <td align=right><b>Type in database name</b></td>
> <td><input type="text" name="database"
> value=<?php echo @$_POST['database'] ?> ></td>
> </tr>
> <tr>
> <td align="right" valign="top">
> <b>Type in SQL query</b></td>
> <td><textarea name="query" cols="60"
> rows="10"><?php echo $query ?></textarea>
> </td>
> </tr>
> <tr>
> <td colspan="2" align="center"><input type="submit"
> value="Submit Query"></td>
> </tr>
> </table>
> </form>
> </body></html>
>
> when i'm trying to execute it. such message appears:
> "Warning: mysql_connect(): Access denied for user 'ODBC'@'localhost' (using p***word: NO) in z:\home\localhost\www\2.php on line 11
>
> Warning: mysql_select_db(): Access denied for user 'ODBC'@'localhost' (using p***word: NO) in z:\home\localhost\www\2.php on line 12
>
> Warning: mysql_select_db(): A link to the server could not be established in z:\home\localhost\www\2.php on line 12
>
> Warning: mysql_query(): Access denied for user 'ODBC'@'localhost' (using p***word: NO) in z:\home\localhost\www\2.php on line 14
>
> Warning: mysql_query(): A link to the server could not be established in z:\home\localhost\www\2.php on line 14
> Database Selected: i"
>
> what does it' mean?


It just means that you are using a wrong username/p***word combination
to connect.

Tijnema
>
> --
> Best regards,
> Pavel private.php?do=newpm&u=
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: [PHP] Problem with MySQL
Old
  (#10)
Jochem Maas
Guest
 
Posts: n/a
Default Re: [PHP] Problem with MySQL - 05-14-2007, 03:55 AM

Németh Zoltán wrote:
> 2007. 03. 20, kedd keltezéssel 15.09-kor Pavel Kaznarskiy ezt ÃÂ*rta:
>> Hello !


....

>
> what do you want with that '@' here?
> that operator can be used to suppress error messages when calling
> functions but not when using a variable
>


not true - although it's a lazy/bad* way of doing things,
the following only emits 1 E_NOTICE:

php -r '
error_reporting(E_ALL);
if ($foo == "bar")
echo "qux";
if (@$foo == "bar")
echo "qux";
'

*take your pick

....
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
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

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





Contact Us - Forum Care Forums - Archive - Top