php-general Digest 17 Sep 2013 19:38:29 -0000 Issue 8365

2013-09-17 Thread php-general-digest-help

php-general Digest 17 Sep 2013 19:38:29 - Issue 8365

Topics (messages 322075 through 322075):

Resolving a PHP Notice Error
322075 by: Ron Piggott

Administrivia:

To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
php-gene...@lists.php.net


--
---BeginMessage---

I am wanting to establish a default sort by preference when the user hasn’t 
specified one.  I setup to test this with:

?php

if ( !is_set( $sort_by_preference ) ) {

$sort_by_preference = government_wording;

}

?

But I am receiving a Notice error:

Notice:  Undefined variable: sort_by_preference in GIFI_codes.php on line 11- 
Line 11 is “if ( !is_set( $sort_by_preference ) ) {“What is the correct way to 
test this without triggering a Notice error?Ron
Ron Piggott



www.TheVerseOfTheDay.info 
---End Message---


Re: [PHP] Resolving a PHP Notice Error

2013-09-17 Thread Daniel Brown
On Tue, Sep 17, 2013 at 3:38 PM, Ron Piggott
ron.pigg...@actsministries.org wrote:

 I am wanting to establish a default sort by preference when the user hasn’t 
 specified one.  I setup to test this with:

 ?php

 if ( !is_set( $sort_by_preference ) ) {

Did you create a function is_set(), or did you mean to use the
construct isset()?

-- 
/Daniel P. Brown
Network Infrastructure Manager
http://www.php.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Resolving a PHP Notice Error

2013-09-17 Thread Ron Piggott

I am wanting to establish a default sort by preference when the user hasn’t 
specified one.  I setup to test this with:

?php

if ( !is_set( $sort_by_preference ) ) {

$sort_by_preference = government_wording;

}

?

But I am receiving a Notice error:

Notice:  Undefined variable: sort_by_preference in GIFI_codes.php on line 11- 
Line 11 is “if ( !is_set( $sort_by_preference ) ) {“What is the correct way to 
test this without triggering a Notice error?Ron
Ron Piggott



www.TheVerseOfTheDay.info 


Re: [PHP] Resolving a PHP Notice Error

2013-09-17 Thread Sebastian Krebs
2013/9/17 Ron Piggott ron.pigg...@actsministries.org


 I am wanting to establish a default sort by preference when the user
 hasn’t specified one.  I setup to test this with:

 ?php

 if ( !is_set( $sort_by_preference ) ) {

 $sort_by_preference = government_wording;

 }

 ?

 But I am receiving a Notice error:

 Notice:  Undefined variable: sort_by_preference in GIFI_codes.php on line
 11- Line 11 is “if ( !is_set( $sort_by_preference ) ) {“What is the correct
 way to test this without triggering a Notice error?Ron
 Ron Piggott


Because actually you are looking for isset() (not is_set()).





 www.TheVerseOfTheDay.info




-- 
github.com/KingCrunch


[PHP] assign database result to iinput text box

2013-09-17 Thread iccsi
I have following html code to show my input text box and php to connect 
server and select result from database server.
I would like to know how I can I use php to assign the value to my input 
text.

Your help and information is great appreciated,

Regards,

Iccsi,

INPUT type=text name=Mytxt id=MytextID /


?php
$username = root;
$password = myPassword;
$hostname = localhost;

//connection to the database
$dbhandle = mysql_connect($hostname, $username, $password)
 or die(Unable to connect to MySQL);
echo Connected to MySQLbr;

//select a database to work with
$selected = mysql_select_db(iccsimd,$dbhandle)
 or die(Could not select aerver);

//execute the SQL query and return records
$result = mysql_query(SELECT invid, invdate, note, amount FROM invheader);


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php