[PHP] php and sql problem with mysql_query and insert
hi ... im having a little problem with mysql_query("insert into members ('$company', '$name1', '$name2', '$address1', '$address2', ''$ac1', '$ext2', '$num1', '$ac2', '$ext2', '$num2', '$city', '$state', '$zip', '$desc', '$flags')"); for some reason those variables are empty by the time they get into the table... im running mysql 3.2.3.x, php 4 used as module in apache, windows me and apache 1.3.4 the variables come from a form and then posted to a comfirmation page where all the contents of the variables are printed in a table before user would click the continue link at the bottum of the page... after that the link would call a file called addtolist.php which would add the var list to a table and return either an error message or a success message.. i havent yet found how to have a php script load a new web page other than include() or require() and dont know if that is making my problem or just what it is... i will include the test file called addtolist.php below...: here. ENDOF_BLOCK; ?> tnx for the help --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MySQL Madness
hi.. i came across the same problem before and it was well lets say i probably dont have any hair left (from pulling it out) hehe.. anyways you need to go into the grant tables and look to see what is set up for users.. most likely you dont have a root@localhost user because as far as i understand "localhost" as far as mysql is concerned doesnt exist.. no its not a good idea to run mysql as root but in testing on local computers is fine. try this if you have to default install try this set of code in your php file: note when you put your domain name or ip address in the connect function dont put the brackets there... try that and see what happens - Original Message - From: "Gibbs, Liam - SXIA" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 29, 2003 9:45 AM Subject: [PHP] MySQL Madness > First off, when executing this command: > > $connection = mysql_connect("localhost", "root", ""); > > I get this error msg: > > Warning: mysql_connect() [function.mysql-connect]: Access denied for user: > 'root@localhost' (Using password: NO) in > /home/superpage/public_html/index.php on line 49 > > I've gone and read some information on the Internet (understanding almost > nothing from the technical stuff--I'm a MySQL/server admin newbie), but I > gathered some information. > > Now, a lot of what I read pertains to MySQL and not running it with PHP, but > what I did gather from my own gruntwork file-searching and stuff on the Web > was that I changed php.ini so that mysql.default_user = root and > mysql.default_password = my password. Not a smart idea to run MySQL as root, > but I'm trying to make headway. I restarted Apache. That didn't work. I > didn't touch mysql.default_port, .default_host, or .default_socket (don't > know if I should; didn't find anything that said I should), but I'm really > stuck on this. Any other information on MySQL pertained strictly to MySQL > and not PHP, and when I included PHP in my search criteria, it just came up > with a bunch of pages that had PHP as an extension or a directory name. > Searching the PHP-dev archives seems to bring up two search results which > are the same conversation, and only really mention it in passing from what I > understand. Any clues? > > I can access MySQL through the command ./mysql -u root -p mysql, but > obviously that doesn't help when I'm supposed to access it through PHP. I've > executed commands there fine. > > Not sure if it matters, but I have PHP 4.3.0 and MySQL 11.18 Distrib 3.23.54 > for pc-linux (i686). > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MySQL Madness
ok sorry to repeat everything already said - Original Message - From: Adam Voigt To: Sunfire Cc: Gibbs, Liam - SXIA ; [EMAIL PROTECTED] Sent: Wednesday, January 29, 2003 1:00 PM Subject: Re: [PHP] MySQL Madness MySQL infact perfectly understands what localhost is, example: GRANT ALL PRIVILEGES ON dbname.* TO bob@localhost IDENTIFIED BY 'password'; The above will work fine, and aslong as you connect in your PHP with the username "bob", and host "localhost" with pass "password" you'll be fine. On Wed, 2003-01-29 at 12:29, Sunfire wrote: hi.. i came across the same problem before and it was well lets say i probably dont have any hair left (from pulling it out) hehe.. anyways you need to go into the grant tables and look to see what is set up for users.. most likely you dont have a root@localhost user because as far as i understand "localhost" as far as mysql is concerned doesnt exist.. no its not a good idea to run mysql as root but in testing on local computers is fine. try this if you have to default install try this set of code in your php file: note when you put your domain name or ip address in the connect function dont put the brackets there... try that and see what happens - Original Message - From: "Gibbs, Liam - SXIA" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 29, 2003 9:45 AM Subject: [PHP] MySQL Madness > First off, when executing this command: > > $connection = mysql_connect("localhost", "root", ""); > > I get this error msg: > > Warning: mysql_connect() [function.mysql-connect]: Access denied for user: > 'root@localhost' (Using password: NO) in > /home/superpage/public_html/index.php on line 49 > > I've gone and read some information on the Internet (understanding almost > nothing from the technical stuff--I'm a MySQL/server admin newbie), but I > gathered some information. > > Now, a lot of what I read pertains to MySQL and not running it with PHP, but > what I did gather from my own gruntwork file-searching and stuff on the Web > was that I changed php.ini so that mysql.default_user = root and > mysql.default_password = my password. Not a smart idea to run MySQL as root, > but I'm trying to make headway. I restarted Apache. That didn't work. I > didn't touch mysql.default_port, .default_host, or .default_socket (don't > know if I should; didn't find anything that said I should), but I'm really > stuck on this. Any other information on MySQL pertained strictly to MySQL > and not PHP, and when I included PHP in my search criteria, it just came up > with a bunch of pages that had PHP as an extension or a directory name. > Searching the PHP-dev archives seems to bring up two search results which > are the same conversation, and only really mention it in passing from what I > understand. Any clues? > > I can access MySQL through the command ./mysql -u root -p mysql, but > obviously that doesn't help when I'm supposed to access it through PHP. I've > executed commands there fine. > > Not sure if it matters, but I have PHP 4.3.0 and MySQL 11.18 Distrib 3.23.54 > for pc-linux (i686). > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Adam Voigt ([EMAIL PROTECTED]) The Cryptocomm Group My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003
Re: [PHP] Calling other php scripts from inside a php script.
it isnt that hard to do.. if you can get "student" and "supervisor" to successfully log into the web pages (even if you dont have anything to display) then all you really need to do is this: suppose that you had $user for username in the form and $password in the form for password... do this: /*after all of the sql login/query is done and checking user names do this:*/ if($user=="student"){ include("scriptname.php"); }elseif($user=="supervisor"){ include("scriptname.php"); }else{ print"an error message here"; } /*end*/ dont know if this would help i would need to see your actual login page and the script that drives the login sequence before i could really tell what to do for it..it all depends on how you have it set up..and are you getting usernames from a sql table or is it hard coded into the login script?? let me know and mail me private off list at [EMAIL PROTECTED] if you want help... laters - Original Message - From: "Jason Howlett" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, February 01, 2003 10:45 AM Subject: [PHP] Calling other php scripts from inside a php script. > Hi, > > I am new to PHP and I am writing a script that evaluates input from a form > then calls other PHP scripts depending on the input it receives. > > The login form is very simple and asks the user to enter a username and a > password. It is used by two types of users, students and supervisors. In the > PHP script I check to see what the value is for the username. If it equals > "student" I need to call a script that displays the information for the > correct student. Else a different script is called that allows the > supervisor to select a particular student. > > I am not sure how I can call these scripts to run from inside my current > script. > > I know that PHP includes can be used to display code from another script in > the current page but I need to call the scripts to run and the content > displayed in a separate new page. > > Any advice much appreciated! > > > Thank you > > > Jason Howlett > > > > _ > Stay in touch with MSN Messenger http://messenger.msn.co.uk > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] using tags with php
hi.. this is what i want to do but dont realy know how to do it... i want to set up a form that will load values from a table and make them the "value" of the edit box... then when people press an update button then all of the stuff that changes from the record already in the table gets changed... anybody know how to make it where you can get the values out of a table and make them the default value of a input field...? --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] using tags with php
i tried getting the values into vars using fetch_array/fetch_object and fetch_row and tried to put them in variables but for some odd reason it really doesnt work because when i try to use the vars in the value section instead of printing in the edit box the content of the variable i usually end up with "?>", ">", "" instead... any reason this shows up? and when i do: echo ""; then on the web page i end up with some thing like this instead of the edit box: ">";;"> }?> any reason for that? how would i get the content into vars from the table? guess thats the main problem right now - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, February 01, 2003 4:28 PM Subject: Re: [PHP] using tags with php > In a message dated 2/1/2003 12:52:24 PM Pacific Standard Time, > [EMAIL PROTECTED] writes: > > >i want to set up a form that will load values from a table and make them the > >"value" of the edit box... then when people press an update button then all > >of the stuff that changes from the record already in the table gets > >changed... anybody know how to make it where you can get the values out of a > >table and make them the default value of a input field...? > > Basically, get your field values from the database and put them in variables. > Then use the variables in your form. For instance, > > echo ""; > > Then, in the script that processes the form, update the database record with > the values that were passed from the form. > > Janet > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] using tags with php
if i do this: /*all the mysql login stuff here*/ $query=mysql_query("select * from members"); while($new=mysql_fetch_array($query)){ echo "$new['company']"; /*so on through the field list*/ } on output all i get is the title with a submit button..otherwise blank.. same thing with fetch_object()...and i have 1 row in the members table..im sort of confused now that it doesnt work for a wierd reason any better ideas on how to get the stuff out of the table and into vars? maybe im doing it wrong - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, February 01, 2003 5:33 PM Subject: Re: [PHP] using tags with php > In a message dated 2/1/2003 2:02:06 PM Pacific Standard Time, > [EMAIL PROTECTED] writes: > > >i tried getting the values into vars using fetch_array/fetch_object and > >fetch_row and tried to put them in variables but for some odd reason it > >really doesnt work because when i try to use the vars in the value section > >instead of printing in the edit box the content of the variable i usually > >end up with "?>", ">", "" instead... any reason this shows > >up? and when i do: > >echo ""; > >then on the web page i end up with some thing like this instead of the edit > >box: > >">";;"> > >}?> > >any reason for that? > > It sounds like $name and/or $new_var may be empty. Did you echo the variables > before using them in your form to check whether the values from the database > are actually in the variables? > > Janet > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] using tags with php (IMPORTANT READ)
hi.. i took your idea... i put the error reporting code at the top of the script and ran it as the problem was still there to see what would happen.. instead i get 0 messages from the reporting system and all i get is the last 7 chars of the print line and the }?> at the end of the script... so for instance if i do: print(" at the end dont know if this is a bug or not but its getting hard to figure out what the problem with my echo or print statements are... here is the whole script: its supposed to get all fields and then display in input text boxes the current values in that certain record i know i missed some stuff in it with the query but at this point was supposed to be a test to see if i could even put it in the box in the first place... but here is the code: edit member pick some of these: \n\n"); } ?> /*end*/ any changes to make it work would be appreciated...tnx - Original Message - From: "Philip Olson" <[EMAIL PROTECTED]> To: "Sunfire" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Saturday, February 01, 2003 6:48 PM Subject: Re: [PHP] using tags with php (IMPORTANT READ) > > On Sat, 1 Feb 2003, Sunfire wrote: > > > if i do this: > > /*all the mysql login stuff here*/ > > > > $query=mysql_query("select * from members"); > > while($new=mysql_fetch_array($query)){ > > echo "$new['company']"; > > /*so on through the field list*/ > > } > > on output all i get is the title with a submit button.. > > otherwise blank.. > > There is a bug in PHP 4.3.0 regarding the use of arrays > in strings. The following gave a parse error before > PHP 4.3.0: > > print "Do not do this: $arr['key']"; > > Now it gives an E_NOTICE error due to changes to the string > scanner. In PHP 4.3.1 it will no longer give a bogus E_NOTICE > and instead it will work (no parse error either). Surrounding > the array with {braces} in the string works regardless, so: > > print "You can do this: {$arr['key']}"; > > Regarding this question, don't write it like that but instead > do the following (no quotes needed): > > echo $new['company']; > > For those wondering about this bug, see: > > http://bugs.php.net/bug.php?id=21820 > > The string documentation has been updated to demonstrate > the array in string phenomena (except the bug hasn't been > mentioned as I'm waiting for it to be committed first). > > http://www.php.net/types.string > > Sunfire, you aren't seeing this E_NOTICE error because your > error level is turned down (by default). Put this on top > of your script to see them all: > > error_reporting(E_ALL); > > Regards, > Philip > > > > same thing with fetch_object()...and i have 1 row in the members table..im > > sort of confused now that it doesnt work for a wierd reason > > > > any better ideas on how to get the stuff out of the table and into vars? > > maybe im doing it wrong > > > > > > - Original Message - > > From: <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Saturday, February 01, 2003 5:33 PM > > Subject: Re: [PHP] using tags with php > > > > > > > In a message dated 2/1/2003 2:02:06 PM Pacific Standard Time, > > > [EMAIL PROTECTED] writes: > > > > > > >i tried getting the values into vars using fetch_array/fetch_object and > > > >fetch_row and tried to put them in variables but for some odd reason it > > > >really doesnt work because when i try to use the vars in the value > > section > > > >instead of printing in the edit box the content of the variable i usually > > > >end up with "?>", ">", "" instead... any reason this shows > > > >up? and when i do: > > > >echo ""; > > > >then on the web page i end up with some thing like this instead of the > > edit > > > >box: > > > >">";;"> > > > >}?> > > > >any reason for that? > > > > > > It sounds like $name and/or $new_var may be empty. Did you echo the > > variables > > > before using them in your form to check whether the values from the > > database > > > are actually in the variables? > > > > > > Janet > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > > > --- > > Outgoing mail is certified Virus Free. > > Checked by AVG anti-virus system (http://www.grisoft.com). > > Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] using tags with php
ok let me try this question thing again... i am having a problem using tags by using current values kept in a mysql table. how do you get the values out of the table and into a form so they show as the value= part of the tag? i tried just aabout everything and it doesnt work even htmlspecialchars() doesnt work.. all i get for output on the page is the rest of the script printed on the screen after the value= part of the tag..is there any way to fix it? - Original Message - From: "Philip Olson" <[EMAIL PROTECTED]> To: "Sunfire" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Saturday, February 01, 2003 8:01 PM Subject: Re: [PHP] using tags with php > On Sat, 1 Feb 2003, Sunfire wrote: > > > hi.. i took your idea... > > i put the error reporting code at the top of the script and ran it as the > > problem was still there to see what would happen.. instead i get 0 messages > > from the reporting system and all i get is the last 7 chars of the print > > line and the }?> at the end of the script... so for instance if i do: > > print(" > or any variance of that statement changing around the \" and apostrophes > > around to try different things all i get is the rest of the script starting > > from the \n all the way to the rest of the script where it says }?> at the > > end dont know if this is a bug or not but its getting hard to figure out > > what the problem with my echo or print statements are... > > here is the whole script: > > its supposed to get all fields and then display in input text boxes the > > current values in that certain record i know i missed some stuff in it with > > the query but at this point was supposed to be a test to see if i could even > > put it in the box in the first place... but here is the code: > > Please step back, slow down, and write your question > in a short concise format. I have no clue what the > above means. > > > > > > > edit member > > > > > > > > > > pick some of these: > > > error_reporting(E_ALL); > > mysql_connect("192.4.5.6", "root", ""); > > mysql_select_db("wata"); > > $result=mysql_query("select * from members where company like 'test'"); > > while($row=mysql_fetch_array($result)){ > > print("\n\n"); > > // Try this instead, see also: htmlspecialchars()* > print ""; > > Regards, > Philip > > * http://www.php.net/manual/en/faq.html.php#faq.html.encoding > > > > } > > ?> > > > > > > > > > > /*end*/ > > any changes to make it work would be appreciated...tnx > > > > > > - Original Message - > > From: "Philip Olson" <[EMAIL PROTECTED]> > > To: "Sunfire" <[EMAIL PROTECTED]> > > Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > > Sent: Saturday, February 01, 2003 6:48 PM > > Subject: Re: [PHP] using tags with php (IMPORTANT READ) > > > > > > > > > > On Sat, 1 Feb 2003, Sunfire wrote: > > > > > > > if i do this: > > > > /*all the mysql login stuff here*/ > > > > > > > > $query=mysql_query("select * from members"); > > > > while($new=mysql_fetch_array($query)){ > > > > echo "$new['company']"; > > > > /*so on through the field list*/ > > > > } > > > > on output all i get is the title with a submit button.. > > > > otherwise blank.. > > > > > > There is a bug in PHP 4.3.0 regarding the use of arrays > > > in strings. The following gave a parse error before > > > PHP 4.3.0: > > > > > > print "Do not do this: $arr['key']"; > > > > > > Now it gives an E_NOTICE error due to changes to the string > > > scanner. In PHP 4.3.1 it will no longer give a bogus E_NOTICE > > > and instead it will work (no parse error either). Surrounding > > > the array with {braces} in the string works regardless, so: > > > > > > print "You can do this: {$arr['key']}"; > > > > > > Regarding this question, don't write it like that but instead > > > do the following (no quotes needed): > > > > > > echo $new['company']; > > > > > > For those wondering about this bug, see: > > > > > > http://bugs.php.net/bug.php?id=21820 > > > > > > The string documentatio
Re: [PHP] help with script!!!
?", $array[id], $array[username], $array[password], $array[status], $array[notes]); } and make sure that your array indexes are right they are case sensitive in mysql...so array[id] is different than array[Id] or array[ID]... - Original Message - From: "Karl James" <[EMAIL PROTECTED]> To: "php" <[EMAIL PROTECTED]> Sent: Saturday, February 01, 2003 1:37 AM Subject: [PHP] help with script!!! Hello guys and gals!!! can you tell me why i can't get this script to print my table thanks Karl please check out the code below obviously i left my username and passwords blank :-) - ", $array[id], $array[username], $array[password], $array[status], $array[notes]); } ?> - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] using tags with php
sorry already fixed my problems but the original question was what html/php code did i need to do the stuff..all i needed was an example 3 or so line code...i dont need anybody to write my code for me...examples are fine enough to get me through my problems if i have any... btw what is your rates anyways..(just curious) but i have work here to do i am paid to come up with the code myself not pay someone else to have it done for me...(thats lazy) - Original Message - From: "David Freeman" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, February 02, 2003 2:08 AM Subject: RE: [PHP] using tags with php > > > i want to set up a form that will load values from a table > > and make them the > > "value" of the edit box... then when people press an update > > button then all > > of the stuff that changes from the record already in the table gets > > changed... anybody know how to make it where you can get the > > values out of a > > table and make them the default value of a input field...? > > What is it that you're having trouble with? The logic to do what you > want? The actual code to load values from a table (a database table I > presume)? The correct HTML that you need to have values in a form > field? The code to update your database with information from the form? > > Perhaps if you got started with working out what you want to do and then > ask questions. > > Failing that, I'd be happy to write it for you. Of course, I'll charge > my normal hourly rate to do so... > > CYA, Dave > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] including files...
hi was just wondering if there was a way to have a php file with all constant variables like db mysqluser and password and a few other things defined in a file of its own and then be able to use the variables in it for the project it was built for? the last i knew it could be done and all i needed to do was make the file put the definitions in it and then put: include("filename.inc"); at the top of the page..is this right or is there more to it than that? --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] listbox problems
i have a listbox: $account[username]"; } ?> got it to fill listbox with usernames.. now my question is how do you use the $users variable in the php script that deals with the listbox? iat this point all i wanted to do was print the user name that was selected in the listbox but after i get how that works then it will load a form with all user data in it so it can be changed.. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] including files...
how do you tell it to refuse file.inc with a .taxis file? the server i will be running this on is a public server and they dont allow .taxis files i dont think...i will have to check and see - Original Message - From: "Justin French" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; "'Sunfire'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Sunday, February 02, 2003 5:46 PM Subject: Re: [PHP] including files... > on 03/02/03 5:28 AM, John W. Holmes ([EMAIL PROTECTED]) wrote: > > > Pretty much. Only addition is to make sure filename.inc can't be viewed > > through the browser. > > ... by having apache refuse to server all .inc files through http, via the > use of a .htaccess file (assuming apache server) > > Cheers, > > Justin > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] listbox problems
hi.. listbox prob fixed... i had echo ""; in the first file it should have been: echo ""; and in second file i had: echo 'account[username]'; should have been : echo "$account[username].."; - Original Message - From: "Matt" <[EMAIL PROTECTED]> To: "Sunfire" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Sunday, February 02, 2003 4:55 PM Subject: Re: [PHP] listbox problems > >From: "Sunfire" <[EMAIL PROTECTED]> > >Sent: Sunday, February 02, 2003 4:53 PM > >Subject: [PHP] listbox problems > > > > i have a listbox: > > > > > //connect to db and get query > > mysql_connect("."); > > mysql_select_db("..."); > > $query=mysql_query("select username from users); > > /*finish the listbox*/ > > while($account=mysql_fetch_array($query)){ > > echo "$account[username]"; > > Try: > echo " $selected = ($account['username'] == $_POST['user']) ? 'selected' : ''; > echo $selected; > echo ">{$account['username']}"; > > > } > > ?> > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] array of unknown elements and insert query
hi.. i have an array (not written in code yet) but it is from a multiple select listbox and i want to use the elements in the array in an insert query.. and dont know how that works... (i wont know how many elements there will be on the insert)..the array elements will need to be put in 1 field on the table as a single string anybody have example code for that?? --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Html forms
do this: run your php query to get the value of the text box and then do this: "; } ?> - Original Message - From: "Todd Barr" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, February 03, 2003 9:59 AM Subject: [PHP] Html forms I am having difficulty putting results into an form Once the query runs, I have this for my output print ""; This results in an HTML error being apache finds an error AFTER the tag Any ideas? --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] testing if a query was successful
hi.. how would you use an if..else statement to test a query in mysql to see if it was successfull or not? would it be something like: $query=(query here...); if($query){ statements if successfull?? }else{ statements if not true?? } or would it be something else.. tnx --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] testing a query for success--code doesnt work
hi.. posted a message about what the code was to test an update query to see if it was successfull using mysql and i tested my code and for some reason even if none of the fields were updated it still reports the success message... heres the code i have: $query=mysql_query("update members set company="\$company\", ); if($query){ message if successfull... } else{ message if not or if failed..//never gets used } anybody know why this doesnt work if 0 records were changed? --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] testing a query for success--code doesnt work
yes that is what i needed.. how many rows were changed as well as how did the query run in general... i want the: if($query){ ok message } else{ fail message } but i also want a query test that goes something like this: if(0 rows were updated){ message saying nothing happened }else{ message saying the record was actually updated } if i can get some code example for that...it would help tnx - Original Message - From: "Edward Peloke" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, February 04, 2003 3:46 PM Subject: RE: [PHP] testing a query for success--code doesnt work > I believe as long as the update was successful (no errors) it will say > 'message if successful'...I think you are wanting to know if rows were > updated or not...not whether or not the query ran ok. > > Eddie > > -Original Message- > From: Sunfire [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, February 04, 2003 3:51 PM > To: [EMAIL PROTECTED] > Subject: [PHP] testing a query for success--code doesnt work > > > hi.. > posted a message about what the code was to test an update query to see if > it was successfull using mysql and i tested my code and for some reason even > if none of the fields were updated it still reports the success message... > > heres the code i have: > $query=mysql_query("update members set company="\$company\", ); > if($query){ > message if successfull... > } > else{ > message if not or if failed..//never gets used > } > anybody know why this doesnt work if 0 records were changed? > > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] empty variables from a form
hi.. how would you test for an empty (unused) variable from a form.. i have a phone number split into 3 different vairiables and want to test to see if they were used in the form before displaying either the phone number itself or just leaving it out of the display... what code would be good to test it with.. the variables are $ac2 $ext2 and $num2 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] empty variables from a form
tnx will try that my other code looked something like that but it didnt work.. probably had the (and ) in the wrong places... i set it up as the whole statement as 1 if statement not 3 different ones.. - Original Message - From: "Erich Beyrent" <[EMAIL PROTECTED]> To: "Sunfire" <[EMAIL PROTECTED]> Sent: Wednesday, February 05, 2003 1:54 PM Subject: Re: [PHP] empty variables from a form > > hi.. > > > > how would you test for an empty (unused) variable from a form.. > > i have a phone number split into 3 different vairiables and want to test > to > > see if they were used in the form before displaying either the phone > number > > itself or just leaving it out of the display... what code would be good to > > test it with.. the variables are $ac2 $ext2 and $num2 > > Use the isset() function: > > if(isset($ac2)) and > if(isset($ext2)) and > if(isset($num2)) { do something } > else { do something else } > > -Erich- > > > > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] empty variables from a form
hi i tried the code below as well as empty and isset and it seems that even if the variables that have valid data in them they also get excluded from display with the empty ones.. does "" mean any string? or is it the normal empty string? i need to know if the vars that dont get filled in from the form are empty or not... and this isnt working very will... any idea why this happens? ps if i put & or && between if statements it gives me a parse error... - Original Message - From: "Sunfire" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, February 05, 2003 2:40 PM Subject: Re: [PHP] empty variables from a form > tnx will try that my other code looked something like that but it didnt > work.. probably had the (and ) in the wrong places... i set it up as the > whole statement as 1 if statement not 3 different ones.. > > > - Original Message ----- > From: "Erich Beyrent" <[EMAIL PROTECTED]> > To: "Sunfire" <[EMAIL PROTECTED]> > Sent: Wednesday, February 05, 2003 1:54 PM > Subject: Re: [PHP] empty variables from a form > > > > > hi.. > > > > > > how would you test for an empty (unused) variable from a form.. > > > i have a phone number split into 3 different vairiables and want to test > > to > > > see if they were used in the form before displaying either the phone > > number > > > itself or just leaving it out of the display... what code would be good > to > > > test it with.. the variables are $ac2 $ext2 and $num2 > > > > Use the isset() function: > > > > if(isset($ac2)) and > > if(isset($ext2)) and > > if(isset($num2)) { do something } > > else { do something else } > > > > -Erich- > > > > > > > > > > > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re: [PHP] empty variables from a form
empty doesnt work either... it still comes up as though something is in them and excludes either nothing at all or includes everything...even the empty vars..any reason for that ? - Original Message - From: "1LT John W. Holmes" <[EMAIL PROTECTED]> To: "Sunfire" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, February 05, 2003 2:43 PM Subject: Spam: Re: [PHP] empty variables from a form > > > > > how would you test for an empty (unused) variable from a form.. > > > > i have a phone number split into 3 different vairiables and want to > test > > > to > > > > see if they were used in the form before displaying either the phone > > > number > > > > itself or just leaving it out of the display... what code would be > good > > to > > > > test it with.. the variables are $ac2 $ext2 and $num2 > > > > > > Use the isset() function: > > > > > > if(isset($ac2)) and > > > if(isset($ext2)) and > > > if(isset($num2)) { do something } > > > else { do something else } > > That's not a good idea if your trying to check for an empty variable. An > empty text box, when submitted, will still be set and pass isset(). You > should use empty() is that's really what you're looking for. > > ---John Holmes... > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re: [PHP] Variable Problem
if you want to get variables into a form by value= do something like this: and so on - Original Message - From: "Jason Wong" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, February 05, 2003 3:59 PM Subject: Spam: Re: [PHP] Variable Problem > On Thursday 06 February 2003 04:41, Sierra Times.com wrote: > > I have a variable that get's chopped off at the %20 character. > > > > In the form page I have: > > From: > > E-mail address: > > > > > > $sent and $name shows up fine, but immedieately I added (for testing) > > > > > > > > > > > > this statement shows a text box, with only the first word before the space > > charcter "%20" is shown, and is fact the only data that is submitted upon: > > > > > > Can someone assist me? > > > > J.J. Johnson > > Proper HTML has value items enclosed in quotes: value="SOMETHING" > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.biz > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > -- > Search the list archives before you post > http://marc.theaimsgroup.com/?l=php-general > -- > /* > Liar: > one who tells an unpleasant truth. > -- Oliver Herford > */ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: RE: [PHP] Variable Problem
you can do: echo << BLOCK; it is easier if you have a form or large amounts of code to echo/print to the screen with vars and stuff to use the echo <<< stuff its pretty cluttered and its harder to use print or echo for every line of code you need to echo...specially if there are 300 lines of code a block... - Original Message - From: "Leonard Burton" <[EMAIL PROTECTED]> To: "Sierra Times.com" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, February 05, 2003 4:16 PM Subject: Spam: RE: [PHP] Variable Problem > You need to put quotes around the vars. > > If I were you I would do this: > > print ""; > print ""; > > > You need the quotes. > > Leonard. > www.phpna.com > > -Original Message- > From: Sierra Times.com [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, February 05, 2003 3:41 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Variable Problem > > > I have a variable that get's chopped off at the %20 character. > > In the form page I have: > From: > E-mail address: > > > $sent and $name shows up fine, but immedieately I added (for testing) > > > > > > > this statement shows a text box, with only the first word before the space > charcter "%20" is shown, and is fact the only data that is submitted upon: > > > Can someone assist me? > > J.J. Johnson > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re: RE: [PHP] Variable Problem
on any server i ever dealt with if i put: > in the edit box for the value i always always end up with To: "Sunfire" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, February 05, 2003 5:44 PM Subject: Spam: Re: RE: [PHP] Variable Problem > --- Sunfire <[EMAIL PROTECTED]> wrote: > > you can do: > > echo << > //any valid html code here > > > > BLOCK; > > No, he needed to output $sent, which is dynamic. > > Also, it is a lot cleaner (and likely faster) just to use > to switch in/out of PHP as needed. If > you're writing a bunch of static HTML, there's no reason to > be using PHP to do it. > > Chris > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] empty and isset
i tried to use empty and isset to check and see if variables were being used in a form.. im not getting any kind of good answer from the server when i try using empty and isset... it all works the same and that is cut out anything regardless of if it was used or not... any thing to help? the docs didnt seem to be much help and im sort of confused --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] empty and isset
ok i dont know if this will help at all since the code that doesnt work wont fit in the message (got error saying i cant send that much all at once) this is what i got out of var_dump.. first set of variables: $member[Areacode1]=string(3)"123" 123 $member[Exchange1]=string(3)"123"123 $member[Number1]=string(4)"1234"1234 those variables im not worried about because they are required in the form. the next ones i want to exclude from the list all together if string()==0 on all 3 variables.. here is the var dumb from them: $member[AreaCode2]string(0)"" $member[Exchange2]string(0)"" $member[Number2]string(0)"" here is the seudo code for what i need to do: if $member[AreaCode] & $member[Exchange2] & $member[Number2] is empty, null =="" or has string(0) in it { //exclude vars from list alltogether } any other conditions{ //print the vars in the list } - Original Message - From: "John W. Holmes" <[EMAIL PROTECTED]> To: "'Sunfire'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, February 05, 2003 9:57 PM Subject: RE: [PHP] empty and isset > They both work, you're just not using the correct logic or something. > Show your code again... your actual code that isn't working (so you say) > and the form that's being submitted. Also, is register_globals on or > off? > > Load this small bit of code as proof that it works: > > > > > > if(isset($_POST['name'])) > { > echo "You submitted a name "; > if(empty($_POST['name'])) > { echo "that was blank."; } > else > { echo "of {$_POST['name']}"; } > } > ?> > > ---John W. Holmes... > > PHP Architect - A monthly magazine for PHP Professionals. Get your copy > today. http://www.phparch.com/ > > > -Original Message- > > From: Sunfire [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, February 05, 2003 8:08 PM > > To: [EMAIL PROTECTED] > > Subject: [PHP] empty and isset > > > > i tried to use empty and isset to check and see if variables were > being > > used > > in a form.. im not getting any kind of good answer from the server > when i > > try using empty and isset... it all works the same and that is cut out > > anything regardless of if it was used or not... > > > > > > any thing to help? > > the docs didnt seem to be much help and im sort of confused > > > > > > > > > > --- > > Outgoing mail is certified Virus Free. > > Checked by AVG anti-virus system (http://www.grisoft.com). > > Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/11/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] empty and isset
yes tnx that did work now any blank variable i need tested in that set wont show up on the list.. i have a few other bugs to work out with printing and formatting but will take care of that a little later... - Original Message - From: "John W. Holmes" <[EMAIL PROTECTED]> To: "'Sunfire'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, February 06, 2003 12:08 AM Subject: RE: [PHP] empty and isset > If(!empty($member['Areacode2']) || > !empty($member['Exchange2']) || !empty($member['Number2'])) > { echo $member['Areacode2'] . '-' . $member['Exchange2'] . '-' . > $member['Number2']; } > > The mail wrapping will mess that up, but hopefully you get the idea. > You're looking for Areacode2 OR Exchange2 OR Number2 being NOT (that's > what the ! is for) empty. If any of them are not empty, then you print > out their values. > > If you only want it displayed if all of them are NOT empty, then change > the || (which means OR) to && (which means AND). A single & means a > bitwise AND, which you don't want to mess with. > > Hope that helps. > > ---John W. Holmes... > > PHP Architect - A monthly magazine for PHP Professionals. Get your copy > today. http://www.phparch.com/ > > > -Original Message- > > From: Sunfire [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, February 06, 2003 12:02 AM > > To: [EMAIL PROTECTED] > > Subject: Re: [PHP] empty and isset > > > > ok i dont know if this will help at all since the code that doesnt > work > > wont > > fit in the message (got error saying i cant send that much all at > once) > > this > > is what i got out of var_dump.. > > first set of variables: > > $member[Areacode1]=string(3)"123" 123 > > $member[Exchange1]=string(3)"123"123 > > $member[Number1]=string(4)"1234"1234 > > those variables im not worried about because they are required in the > > form. > > the next ones i want to exclude from the list all together if > string()==0 > > on > > all 3 variables.. here is the var dumb from them: > > $member[AreaCode2]string(0)"" > > $member[Exchange2]string(0)"" > > $member[Number2]string(0)"" > > here is the seudo code for what i need to do: > > if $member[AreaCode] & $member[Exchange2] & $member[Number2] is empty, > > null > > =="" or has string(0) in it { > > //exclude vars from list alltogether > > } > > any other conditions{ > > //print the vars in the list > > } > > > > - Original Message - > > From: "John W. Holmes" <[EMAIL PROTECTED]> > > To: "'Sunfire'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > > Sent: Wednesday, February 05, 2003 9:57 PM > > Subject: RE: [PHP] empty and isset > > > > > > > They both work, you're just not using the correct logic or > something. > > > Show your code again... your actual code that isn't working (so you > say) > > > and the form that's being submitted. Also, is register_globals on or > > > off? > > > > > > Load this small bit of code as proof that it works: > > > > > > > > > > > > > > > > > > > > if(isset($_POST['name'])) > > > { > > > echo "You submitted a name "; > > > if(empty($_POST['name'])) > > > { echo "that was blank."; } > > > else > > > { echo "of {$_POST['name']}"; } > > > } > > > ?> > > > > > > ---John W. Holmes... > > > > > > PHP Architect - A monthly magazine for PHP Professionals. Get your > copy > > > today. http://www.phparch.com/ > > > > > > > -Original Message- > > > > From: Sunfire [mailto:[EMAIL PROTECTED]] > > > > Sent: Wednesday, February 05, 2003 8:08 PM > > > > To: [EMAIL PROTECTED] > > > > Subject: [PHP] empty and isset > > > > > > > > i tried to use empty and isset to check and see if variables were > > > being > > > > used > > > > in a form.. im not getting any kind of good answer from the server > > > when i > > > > try using empty and isset... it all works the same and that is cut > out > > > > anything regardless of if it was used or not... > > > > > > > > > > > >
Re: [PHP] empty and isset
you need to test for empty strings such as "" which variables have when you submit an empty form .. if(!empty(varname) && !empty(varname2) && !empty(varname 3)..){ //do whatever if they have something usefull in them //this block of code will be ran if var_dumb() on all the //vars tested is > than string(0)"" }else{ //do whatever if string()".." is anything else } - Original Message - From: "Bryan Lipscy" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 06, 2003 12:20 AM Subject: RE: [PHP] empty and isset > Env: Slackware 8.1, Apache 1.3.27, PHP 4.3.0 > Bugs: None found for these issues. > > I am running to this same problem. The isset() function appears to have > problems with the empty text value. The empty() function sees the value > of $_POST['q1'] as expected. > > So why is both isset() and empty() returning true on q1? > > I included the is_null() to verify that the value is definitely not > null. > > Submitting the empty form yields these results: > Value of q1 == > Value of q1 is NOT NULL > Q1 is empty > q2 is empty > q3 is empty > q4 is empty > > Values for q2, q3, and q4 all return as expected. > > > Source follows: > > > > PHP Test > > > > > > > > > Text: value=""> > Radio: > > > > > > Checkbox: value="9"> > > name="Reset"> > > > > > > PHP Source: > > if (isset($_POST['q1'])){ > print "Value of q1 == ".$_POST['q1'].""; > } > > if (is_null($_POST['q1'])){ > print "Value of q1 is null"; > } else { > print "Value of q1 is NOT NULL"; > } > > if (empty($_POST['q1'])){ > print "Q1 is empty"; > } > > if (isset($_POST['q2'])){ > print "Value of q2 == ".$_POST['q2'].""; > } > > if (empty($_POST['q2'])){ > print "q2 is empty"; > } > > if (isset($_POST['q3'])){ > print "Value of q3 == ".$_POST['q3'].""; > } > > if (empty($_POST['q3'])){ > print "q3 is empty"; > } > > if (isset($_POST['q4'])){ > print "Value of q4 == ".$_POST['q4'].""; > } > > if (empty($_POST['q4'])){ > print "q4 is empty"; > } > > ?> > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re: RE: [PHP] Variable Problem
no that doesnt work either what you get when you do that one in the edit box is: using: > or any different with echo in the value field gives me in the box: }> ...rest of the script outside the box - Original Message - From: "Jason Wong" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 06, 2003 12:25 AM Subject: Re: Re: RE: [PHP] Variable Problem > On Thursday 06 February 2003 07:48, Sunfire wrote: > > on any server i ever dealt with if i put: > > > > > in the edit box for the value i always always end up with > what $sent stands for..the only way i found it to work is with echo <<< but > > maybe im missing something > > With the above you should end up with a parse error. The correct syntax which > should work regardless of your server settings is: > > > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.biz > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > -- > Search the list archives before you post > http://marc.theaimsgroup.com/?l=php-general > -- > /* > Don't worry. Life's too long. > -- Vincent Sardi, Jr. > */ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] empty and isset
actually so does empty end up testing true on an empty var... thats because empty thinks "" or string(0) is actually a string just blank... a trick to do with empty is use !empty which will say if the string is at least 1 char long other wish if it is less than 1 char long even though a string does exist then it must be empty.. because: if(empty(var)){ echo "its blank";//eek doesnt work cuz string does exist }else{ echo "something in there";//defaults regardless string(0)"" //is a string so above block will never be used //im sort of confused because: if(!empty(var)){ echo "something in there";//it works for a wierd reason }else{ echo "its blank"//works if string(0)"" or null exists } its strange that !empty will always return a 0 char string/null as false but empty it doesnt care its always true regardless... any reason for that? cuz im confused as to why you have to use !empty instead of empty - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 06, 2003 9:50 AM Subject: Re: [PHP] empty and isset > > Actually, I believe it's not a matter of the input being set, but the fact > that isset() returns true on an empty variable. > > > > > Jason Wong > lins.biz>cc: >Subject: Re: [PHP] empty and isset > 02/06/2003 12:31 > AM > Please respond to > php-general > > > > > > > On Thursday 06 February 2003 13:20, Bryan Lipscy wrote: > > Env: Slackware 8.1, Apache 1.3.27, PHP 4.3.0 > > Bugs: None found for these issues. > > > > I am running to this same problem. The isset() function appears to have > > problems with the empty text value. The empty() function sees the value > > of $_POST['q1'] as expected. > > > > So why is both isset() and empty() returning true on q1? > > of type text are set regardless of whether you have entered > anything. > Thus isset() returns true. > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.biz > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > -- > Search the list archives before you post > http://marc.theaimsgroup.com/?l=php-general > -- > /* > Have you noticed that all you need to grow healthy, vigorous grass is a > crack in your sidewalk? > */ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] if(!empty()) statement
hi.. i have a combobox that has members from a mysql database loaded into it.. one of the choices is "select a member to edit" and has a value of "". now if a person selects "select a member to edit", then an error message shows up saying they need to select a member to edit and puts them back to the main menu with a link.. now if they really do pick a member to edit i want the form to show up.. what i need to know is how do you break/drop out of an if statement..: //mysqlstatements here if(!empty($EditMember)){ //need to skip this or break out of it }else{ //error section } or should i do: if(empty($EditMember)){ //error message e}else{ //the form} --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] update to table errors/strange things happen
i have a combo box on a web page that gets all the companies names from a mysql table and puts them in the combobox.. when someone picks a name and hits an edit button it takes them to a form where all the values in the table fields for that record are shown as default values for the form fields. my problem is when someone changes a value say the city or state (but it happens with any of the fields) and if for some reason they change it to the same value that was already in the record then all of the records get changed and updated to show that every records have the same values for all fields... does anybody know why that is and possible how to fix that problem so only that record gets changed? my source is rather huge in size and since i cant find the place where the problem is coming from it would be hard to post all the source here.. can anybody help? my update statement has all 16 fields in it because i dont know if you can do conditional updates with variables and if you can how to do that... --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] update to table errors/strange things happen
//connect to server and database //start combo box select a member to edit //code to populate combobox from db \"$edit[Company]"; } ?> //rest of code for page here... not that hard probably about 4 lines of code to make the box and put db stuff in it... still need to figure out why my update statement updates all records if someone retypes the same value in the form though - Original Message - From: "Guru Geek" <[EMAIL PROTECTED]> To: "Sunfire" <[EMAIL PROTECTED]> Sent: Friday, February 07, 2003 12:08 PM Subject: Re: [PHP] update to table errors/strange things happen > Could I just see the section of code that populates the combo box with database > info? I'm trying to do that exact same thing, but can't figure out the code > > Thanks, > Roger > > Sunfire wrote: > > > i have a combo box on a web page that gets all the companies names from a > > mysql table and puts them in the combobox.. when someone picks a name and > > hits an edit button it takes them to a form where all the values in the > > table fields for that record are shown as default values for the form > > fields. my problem is when someone changes a value say the city or state > > (but it happens with any of the fields) and if for some reason they change > > it to the same value that was already in the record then all of the records > > get changed and updated to show that every records have the same values for > > all fields... > > > > does anybody know why that is and possible how to fix that problem so only > > that record gets changed? my source is rather huge in size and since i cant > > find the place where the problem is coming from it would be hard to post all > > the source here.. > > > > can anybody help? > > > > my update statement has all 16 fields in it because i dont know if you can > > do conditional updates with variables and if you can how to do that... > > > > --- > > Outgoing mail is certified Virus Free. > > Checked by AVG anti-virus system (http://www.grisoft.com). > > Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] delete query doesnt work
i have a delete query: mysql_query("delete from members where company='$delete'); it doesnt work should i change it to : mysql_query("delete from members where company like '$delete'");?? the first one worked in mysql client but it doesnt work in php script for some reason... also having problems with update... if nothing on the form changes and it gets submitted anyways all the records in the db gets changed to the same thing that one record has in it... --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] delete query doesnt work
it doesnt say anything query returns 1 and there are 0 errors and 0 warnings but when i echo the query string: echo "delete from members where company= '$delete'"; it will show on the web page: delete from members where company = so the $delete is blank for some reason... is it possible that submitting a variable from 1 form to another that some wont get carried over? - Original Message - From: "Van Andel, Robbert" <[EMAIL PROTECTED]> To: "Sunfire" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, February 07, 2003 5:05 PM Subject: RE: [PHP] delete query doesnt work What is the error message you get if you put this in if(!mysql_query("delete from members where company='$delete')) die (mysql_error()); This would be the first step. Robbert van Andel -Original Message- From: Sunfire [mailto:[EMAIL PROTECTED]] Sent: Friday, February 07, 2003 2:06 PM To: [EMAIL PROTECTED] Subject: [PHP] delete query doesnt work i have a delete query: mysql_query("delete from members where company='$delete'); it doesnt work should i change it to : mysql_query("delete from members where company like '$delete'");?? the first one worked in mysql client but it doesnt work in php script for some reason... also having problems with update... if nothing on the form changes and it gets submitted anyways all the records in the db gets changed to the same thing that one record has in it... --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] delete query doesnt work
here is the forms that delete uses: //the first one is the combo box to select a member to //delete select a member to delete \"$DeleteMember[Company]\""; ?> the second form now is a check box with a submit button to confirm they want it deleted: are you really sure you want to delete the member below? if you want to delete cancel //now the code to actually use $delete in a query run: dont know why it doesnt work...any ideas? - Original Message - From: "Van Andel, Robbert" <[EMAIL PROTECTED]> To: "Sunfire" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, February 07, 2003 5:30 PM Subject: RE: [PHP] delete query doesnt work I've never heard of a variable not getting passed. Make sure that your form element is actually called delete and that it's part of the submitted form. Robbert van Andel -Original Message- From: Sunfire [mailto:[EMAIL PROTECTED]] Sent: Friday, February 07, 2003 2:35 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] delete query doesnt work it doesnt say anything query returns 1 and there are 0 errors and 0 warnings but when i echo the query string: echo "delete from members where company= '$delete'"; it will show on the web page: delete from members where company = so the $delete is blank for some reason... is it possible that submitting a variable from 1 form to another that some wont get carried over? ----- Original Message - From: "Van Andel, Robbert" <[EMAIL PROTECTED]> To: "Sunfire" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, February 07, 2003 5:05 PM Subject: RE: [PHP] delete query doesnt work What is the error message you get if you put this in if(!mysql_query("delete from members where company='$delete')) die (mysql_error()); This would be the first step. Robbert van Andel -Original Message- From: Sunfire [mailto:[EMAIL PROTECTED]] Sent: Friday, February 07, 2003 2:06 PM To: [EMAIL PROTECTED] Subject: [PHP] delete query doesnt work i have a delete query: mysql_query("delete from members where company='$delete'); it doesnt work should i change it to : mysql_query("delete from members where company like '$delete'");?? the first one worked in mysql client but it doesnt work in php script for some reason... also having problems with update... if nothing on the form changes and it gets submitted anyways all the records in the db gets changed to the same thing that one record has in it... --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] delete query doesnt work
ok i changed the endings to those to but still keep getting blank variable in the end for $delete in the delete query - Original Message - From: "Van Andel, Robbert" <[EMAIL PROTECTED]> To: "Sunfire" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, February 07, 2003 5:51 PM Subject: RE: [PHP] delete query doesnt work You're form code is incorrect. select a member to delete should read select a member to delete The line: value=\"$DeleteMember[Company]\">\"$DeleteMember[Company]\""; should read value=\"$DeleteMember[Company]\">\"$DeleteMember[Company]\""; Robbert van Andel -Original Message- From: Sunfire [mailto:[EMAIL PROTECTED]] Sent: Friday, February 07, 2003 2:56 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] delete query doesnt work here is the forms that delete uses: //the first one is the combo box to select a member to //delete select a member to delete \"$DeleteMember[Company]\""; ?> the second form now is a check box with a submit button to confirm they want it deleted: are you really sure you want to delete the member below? if you want to delete cancel //now the code to actually use $delete in a query run: dont know why it doesnt work...any ideas? - Original Message - From: "Van Andel, Robbert" <[EMAIL PROTECTED]> To: "Sunfire" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, February 07, 2003 5:30 PM Subject: RE: [PHP] delete query doesnt work I've never heard of a variable not getting passed. Make sure that your form element is actually called delete and that it's part of the submitted form. Robbert van Andel -Original Message- From: Sunfire [mailto:[EMAIL PROTECTED]] Sent: Friday, February 07, 2003 2:35 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] delete query doesnt work it doesnt say anything query returns 1 and there are 0 errors and 0 warnings but when i echo the query string: echo "delete from members where company= '$delete'"; it will show on the web page: delete from members where company = so the $delete is blank for some reason... is it possible that submitting a variable from 1 form to another that some wont get carried over? - Original Message - From: "Van Andel, Robbert" <[EMAIL PROTECTED]> To: "Sunfire" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, February 07, 2003 5:05 PM Subject: RE: [PHP] delete query doesnt work What is the error message you get if you put this in if(!mysql_query("delete from members where company='$delete')) die (mysql_error()); This would be the first step. Robbert van Andel -Original Message- From: Sunfire [mailto:[EMAIL PROTECTED]] Sent: Friday, February 07, 2003 2:06 PM To: [EMAIL PROTECTED] Subject: [PHP] delete query doesnt work i have a delete query: mysql_query("delete from members where company='$delete'); it doesnt work should i change it to : mysql_query("delete from members where company like '$delete'");?? the first one worked in mysql client but it doesnt work in php script for some reason... also having problems with update... if nothing on the form changes and it gets submitted anyways all the records in the db gets changed to the same thing that one record has in it... --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] delete query doesnt work
yes all of the select option values are coming up as true values just like i wanted and even when i shift $delete from the combobox ($delete is the name of the combobox) to the form with the check box i have printed on the screen "check the box to aprove the deletion of $delete" and in that line next to the check box $delete shows as whatever value was selected in the combo box on the page before... now i check the checkbox and hit yes button and $delete goes poof!! out the window for some reason its string(0)""/null what happened to it?? so im loosing it going from the checkbox to the query string it gets lost... - Original Message - From: "Van Andel, Robbert" <[EMAIL PROTECTED]> To: "Sunfire" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, February 07, 2003 6:14 PM Subject: RE: [PHP] delete query doesnt work Okay. Next step would be to check the select option values in the resulting webpage and make sure that the values are actually there. I think the fact that delete is coming up blank is the key. Robbert van Andel -Original Message- From: Sunfire [mailto:[EMAIL PROTECTED]] Sent: Friday, February 07, 2003 3:16 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] delete query doesnt work ok i changed the endings to those to but still keep getting blank variable in the end for $delete in the delete query - Original Message - From: "Van Andel, Robbert" <[EMAIL PROTECTED]> To: "Sunfire" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, February 07, 2003 5:51 PM Subject: RE: [PHP] delete query doesnt work You're form code is incorrect. select a member to delete should read select a member to delete The line: value=\"$DeleteMember[Company]\">\"$DeleteMember[Company]\""; should read value=\"$DeleteMember[Company]\">\"$DeleteMember[Company]\""; Robbert van Andel -Original Message- From: Sunfire [mailto:[EMAIL PROTECTED]] Sent: Friday, February 07, 2003 2:56 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] delete query doesnt work here is the forms that delete uses: //the first one is the combo box to select a member to //delete select a member to delete \"$DeleteMember[Company]\""; ?> the second form now is a check box with a submit button to confirm they want it deleted: are you really sure you want to delete the member below? if you want to delete cancel //now the code to actually use $delete in a query run: dont know why it doesnt work...any ideas? - Original Message - From: "Van Andel, Robbert" <[EMAIL PROTECTED]> To: "Sunfire" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, February 07, 2003 5:30 PM Subject: RE: [PHP] delete query doesnt work I've never heard of a variable not getting passed. Make sure that your form element is actually called delete and that it's part of the submitted form. Robbert van Andel -Original Message- From: Sunfire [mailto:[EMAIL PROTECTED]] Sent: Friday, February 07, 2003 2:35 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] delete query doesnt work it doesnt say anything query returns 1 and there are 0 errors and 0 warnings but when i echo the query string: echo "delete from members where company= '$delete'"; it will show on the web page: delete from members where company = so the $delete is blank for some reason... is it possible that submitting a variable from 1 form to another that some wont get carried over? - Original Message - From: "Van Andel, Robbert" <[EMAIL PROTECTED]> To: "Sunfire" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, February 07, 2003 5:05 PM Subject: RE: [PHP] delete query doesnt work What is the error message you get if you put this in if(!mysql_query("delete from members where company='$delete')) die (mysql_error()); This would be the first step. Robbert van Andel -Original Message- From: Sunfire [mailto:[EMAIL PROTECTED]] Sent: Friday, February 07, 2003 2:06 PM To: [EMAIL PROTECTED] Subject: [PHP] delete query doesnt work i have a delete query: mysql_query("delete from members where company='$delete'); it doesnt work should i change it to : mysql_query("delete from members where company like '$delete'");?? the first one worked in mysql client but it doesnt work in php script for some reason... also having problems with update... if nothing on the form changes and it gets submitted anyways all the records in the db gets changed to the same thing that one record has in it... --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/
[PHP] strip slashes from variable content
hi.. i have a hidden variable and when its submitted to another script it has the value of "\\\... anybody know how to get the \ out of it? --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] delete query doesnt work (fixed)
hi... my delete query : mysql_query("delete from members where company like '$delete'"); now works..this is how i fixed it... in the form that submits the $delete var add this: now in query change $delete to $flag_delete... and poof it magically works still need to debug the edit system since all the records tend to get changed if someone submits the same data in the fields for that record... --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] how to move database from one server to another
hi... couldnt find anything on the list archive about this (maybe i missed it but my internet explorer crashed before i could find it_) how do you copy a database from a server over to another.. do all i need to do is copy the tables over to the sql server after i make the db? or is it more involved than that.. tnx --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] incromenting $counter in a whloop
hi.. was wondering how you would incroment $counter in a while loop.. i want to print it out next to each record for a record counter on a web page... --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re: [PHP] incromenting $counter in a whloop
i got it tnx... while(whatever){ //record code here //and echo $counter $counter++} - Original Message - From: "Beauford.2002" <[EMAIL PROTECTED]> To: "Sunfire" <[EMAIL PROTECTED]> Sent: Sunday, February 09, 2003 2:14 AM Subject: Spam: Re: [PHP] incromenting $counter in a whloop > This is one way, or you could use a for loop. > > $counter = 1; > > While (whatever) { > > record code goes here > echo $counter; > $counter = $counter + 1; > } > - Original Message - > From: "Sunfire" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Sunday, February 09, 2003 12:37 AM > Subject: [PHP] incromenting $counter in a whloop > > > > hi.. > > > > was wondering how you would incroment $counter in a while loop.. i want to > > print it out next to each record for a record counter on a web page... > > > > > > > > > > > > --- > > Outgoing mail is certified Virus Free. > > Checked by AVG anti-virus system (http://www.grisoft.com). > > Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] a while loop that does't end with the script
try putting exit; at the end of your script will kill it dead in its tracks - Original Message - From: "Francesco Leonetti" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, February 10, 2003 6:34 AM Subject: [PHP] a while loop that does't end with the script > Hi, > I'm a newcomer here to the list, so do please apologize in the case my > question has already been discussed before. > > I just moved from php 4.0.6 to php 4.2.2 for security reasons (4.0.6 got a > big buffer overflow hole...). The working environment now is Redhat 8.1, > mysql 3.23.54a, kernel 2.4.18-19. > > My problem is in a php page including a neverending loop, like this: > > mysql_connect() > > while (1) { >flush() > ... do things... > ... query the database ... > ... echo other things... >flush() > } > > In the previous version of PHP when I exit the page, the script ended as > well (this stopping querying the database). Now when I exit from the page, I > see from the mysqladmin processlist that the mysql_query thread is still > running. It doesn't end and it keeps running 'til I restart httpd. > > This is time and memory consuming. Why the script doesn't end as usual? > > Am I missing something in the configuration files? > > Thank you for any help. > > Bye > Francesco Leonetti > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] automatically delete records from a table
hi.. was wondering about how you could run a script that automatically ran at midnight every day and deleted records that matched a certain date stored in a mysql table? any ideas how that supposed to work?.. i think the script has to be a chron task on linux but im not really sure how to go about doing such a job.. any ideas? --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] automatically delete records from a table
im writing an announcement board and i have a posted timestamp a field for the date and time of the event (needs to be checked with cron) and a event name and message field in the table.. i need to have the date and time of the event checked so when cron runs if the posted event is on 2003-02-11 15:00:00 for example then at 24:00:00 that day cron will delete that record because it isnt needed anymore.. the variables i have are $EventDate $EventTime $Note and NULL (for timestamp).. based on the $EventDate and $EventTime vars pulled out of the table or based on vars created with day(EventDay) and so on how to use them with cron... i have never used cron/crontab before .. and just so i know what should i search for on google...since none of my searches for anything about cron/crontab come back with anything on the list archive.. tnx - Original Message - From: "Steve Werby" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, February 10, 2003 5:12 PM Subject: Re: [PHP] automatically delete records from a table > "Sunfire" <[EMAIL PROTECTED]> wrote: > > was wondering about how you could run a script that automatically ran at > > midnight every day and deleted records that matched a certain date stored > in > > a mysql table? any ideas how that supposed to work?.. > > > > i think the script has to be a chron task on linux but im not really sure > > how to go about doing such a job.. > > man cron and man crontab. If PHP is compiled as a CGI or CLI then you can > call the script directly, otherwise call it via the web using lyxn or wget. > I'd opt for CGI or CLI if at all possible so that you don't need to send a > request to the web server. I figure you know how to write the script and > that it's just a matter of scheduling it. If not please be specific about > the problem. This is asked pretty frequentl on php-general so between the > archives and Google you should find what you're looking for quickly. > > -- > Steve Werby > President, Befriend Internet Services LLC > http://www.befriend.com/ > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] changing table column height in xml
hi.. this might be a little off topic but does anybody know how to change the table height in xml? my partial code is below:: --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] select query question
hi i have a select query i need to do on a field in my table.. the field is called Flags and there is 1 char for every flag that is set for a certain group.. the flags are F S L C G R now what i want to do is search for every instance of Flags field that has any value except L and C in it and select those fields.. so the result would be every record that doesnt have L and C in the Flags field would be selected.. dont know how to do this query i thought it might be something like this: mysql_query("select * from members where Flags not like '%l%c%'"); but not really sure.. i know to use the not like statement but its just figuring out what search pattern to use... tnx --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mysql select and date functions
i have a field in a table called Posted and it is a timestamp type im using mysql and my page is supposed to take the timestamp field and show it on the screen in the form of month#/dayofmonth/year like 02/18/2003 the problem im having is trying to get it to be formatted.. i tried mysql functions like dayofmonth(Posted) month(Posted) and year(Posted) in the query: $query=mysql_query("select dayofmonth(Posted), month(Posted), year(Posted), hour(Posted), minute(Posted), Name, Prayer from prayer"); this query works just fine but my question is now in php how to display the results for dayofmonth(Posted) and so on further code follows: while($view=mysql_fetch_array($query)) { //display variables from query here... //get to the date functions: //$view[month(Posted)]/... doesnt work //php complains about missing ] and this doesnt work //either while($view=mysql_fetch_object($query)){ //show variables here.. //show date fields in table... //$view->dayofmonth(Posted) doesnt work either all i get //in display is (Posted) ...rest of code here... ?> and its strange because if i try: echo $view->dayofmonth(Posted); i get parse error call to undefined function dayofmonth() in file.php on line (line #) any ideas on how to get this to work? --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql select and date functions
tnx it worked just like i wanted it to... - Original Message - From: "Barajas, Arturo" <[EMAIL PROTECTED]> To: "'Sunfire'" <[EMAIL PROTECTED]> Sent: Tuesday, February 18, 2003 7:59 PM Subject: RE: [PHP] mysql select and date functions > Have you tried naming the fields? > > > $query=mysql_query("select dayofmonth(Posted) AS day, > > month(Posted) AS Mo, year(Posted) AS yr, hour(Posted) > > as hr, minute(Posted) as min, Name, Prayer from prayer"); > > and the use > > echo $view->day . "/" . $view->mo . "/" . $view->yr . "\n"; > > or something similar? > -- > Un gran saludo/Big regards... >Arturo Barajas, IT/Systems PPG MX (SJDR) >(427) 271-9918, x448 > > > -Original Message- > > From: Sunfire [mailto:[EMAIL PROTECTED]] > > Sent: Martes, 18 de Febrero de 2003 06:51 p.m. > > To: [EMAIL PROTECTED] > > Subject: [PHP] mysql select and date functions > > > > > > i have a field in a table called Posted and it is a timestamp type > > im using mysql and my page is supposed to take the timestamp > > field and show > > it on the screen in the form of month#/dayofmonth/year > > like 02/18/2003 the problem im having is trying to get it to > > be formatted.. > > i tried mysql functions like dayofmonth(Posted) month(Posted) and > > year(Posted) in the query: > > $query=mysql_query("select dayofmonth(Posted), month(Posted), > > year(Posted), > > hour(Posted), minute(Posted), Name, Prayer from prayer"); > > > > this query works just fine but my question is now in php how > > to display the > > results for dayofmonth(Posted) and so on further code follows: > > while($view=mysql_fetch_array($query)) { > > //display variables from query here... > > > > //get to the date functions: > > //$view[month(Posted)]/... doesnt work > > //php complains about missing ] and this doesnt work > > //either > > while($view=mysql_fetch_object($query)){ > > //show variables here.. > > > > //show date fields in table... > > //$view->dayofmonth(Posted) doesnt work either all i get > > //in display is (Posted) > > ...rest of code here... > > > > ?> > > and its strange because if i try: echo > > $view->dayofmonth(Posted); i get > > parse error call to undefined function dayofmonth() in > > file.php on line > > (line #) > > > > any ideas on how to get this to work? > > > > > > > > > > --- > > Outgoing mail is certified Virus Free. > > Checked by AVG anti-virus system (http://www.grisoft.com). > > Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php, xml and mysql with netscape and ie
hi.. was just wondering when i use php xml and mysql (standard xml) it seems that netscape 4.7 and below wont see the web page with results from a mysql query on them... we dont know about ie5 or below yet but does anybody know why this is or how to fix it? the nature of the web pages is a table built with standard xml that goes into a loop to get all the rows in a table and show them on a web page but for strange reasons anything below netscape 7 ignores everything except the last entry in the mysql table... trying to get someone i know with ie5 or below to look and see if it doesnt work --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] excluding same field values in mysql
hi im making a mailing system for a company. i have to find all email addresses in a table and send email to all of them. the problem comes in when more than 1 company has the same email address (owned by same person). what i have to do is if more than 1 company has the same email address only use one of them that are the same for the email not all of them.. example: company1 email: [EMAIL PROTECTED] company2 email: [EMAIL PROTECTED] in the example above i want to only use one of those addresses since they would end up getting 2 emails and that wouldnt look right.. code i have so far is: "; } echo "go back to main menu"; ?> works fine except only using an email address 1 time if more than one of the same email.. anybody have any ideas how to fix this? tnx --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] excluding same field values in mysql
i am selecting company because the company i am writing this for wanted me to print out on a web page all the company names that had gotten mail from the email system.. and i didnt know if i should do a different query for that or if i could leave it in 1 query... so could i do this: select company, distinct email from members; wasnt sure if that would work right or not... or would i need to do something else for the company print out tnx - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 19, 2003 8:41 PM Subject: Re: [PHP] excluding same field values in mysql In a message dated 2/19/2003 5:22:19 PM Pacific Standard Time, [EMAIL PROTECTED] writes: in the example above i want to only use one of those addresses since they would end up getting 2 emails and that wouldnt look right.. code i have so far is: works fine except only using an email address 1 time if more than one of the same email.. anybody have any ideas how to fix this? I don't know why you are selecting company, but it you didn't, you could use the following query. select DISTINCT Email from members That would eliminate duplicate email addresses. Janet --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003
[PHP] and
hi.. i have a button on a web page that is supposted to go to another web page when either clicked with a mouse or when someone presses enter on it.. : post a prayer that is my basic code for the button... my problem is the fact that when you click the button or hit enter on it all it does is refresh the page if it even does that. how would i actually make this button load another page using php?? tnx --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/11/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] and
tnx! it works now so now i know what i need to do with buttons that are self created now... - Original Message - From: "erich" <[EMAIL PROTECTED]> To: "Sunfire" <[EMAIL PROTECTED]> Sent: Monday, February 24, 2003 12:11 AM Subject: Re: [PHP] and > i would try > onclick="window.location='postprayer.htm';" > onkeypress="window.location='postprayer.htm'"> > > Sunfire wrote: > > >hi.. > > > >i have a button on a web page that is supposted to go to another web page > >when either clicked with a mouse or when someone presses enter on it.. : > > > >post a prayer > > > >that is my basic code for the button... my problem is the fact that when you > >click the button or hit enter on it all it does is refresh the page if it > >even does that. how would i actually make this button load another page > >using php?? > > > >tnx > > > > > > > > > >--- > >Outgoing mail is certified Virus Free. > >Checked by AVG anti-virus system (http://www.grisoft.com). > >Version: 6.0.443 / Virus Database: 248 - Release Date: 1/11/2003 > > > > > > > > > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/11/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] table width problems
usually i would do something like: To: <[EMAIL PROTECTED]> Sent: Sunday, February 23, 2003 10:26 AM Subject: [PHP] table width problems > Hi, > > I've got a table that gets it's contents from a database, the problem is > that even though I specify the width of the table, it is still wider than > it's supposed to be, cause some of the info from the table doesn't > wrap.my question is if there is a way to force td wrapping when it > exceeds the allowed width?? > > Please help > thanks > Adriaan > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/11/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is there a way to "include" php source files in a php script ?
yes include("filename.php"); - Original Message - From: "Rohin Gosling" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, February 23, 2003 2:59 PM Subject: [PHP] Is there a way to "include" php source files in a php script ? > Is there a way to include a *.php source file from inside another php source > file, in a similar fashion to the way you use the "include" directive in C > or C++ ? > > Rohin > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/11/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is it possible to "Include" a php source file ?
yes include("filename.php"); 1. its in the php manual 2. you posted the same question twice already i think (unless 1 was a original post and one was a reply) sorry getting a little tired here its almost 1am here and still working for the last 2 days straight with 0% sleep and 100% caffine.. (sorry wrong list for that but...) - Original Message - From: "Rohin Gosling" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, February 23, 2003 4:32 PM Subject: [PHP] Is it possible to "Include" a php source file ? > First up, I sent this same message a few hours ago, but I do not see it in > the news group, and neither does it appear in my sent messages folder. > Therefore I am presuming that it never made it to the news group. How ever, > if it did get to the news group and I am just unable to see it, then just > ignore this message and hopefully my first attempt to post this question > will show up latter. I did receive a warning message saying that the message > may not appear strait away. So I'm not quite sure what's it going on here. > > Anyway, back to my question. Hopefully it will make it into the news group > this time ! > > Is it possible to "include" a *.php source file from inside another php > source file, an a fashion similar to that of using the include directive in > C or C++ ? > > Or alternatively, is there a way to call a php script stored in another file > from inside a php script. > > Rohin > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/11/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] and
actually yes a link would be rather nice for just going to another page but my client doesnt want a link he is paying for a button to be there instead of a link.. so if thats what he wants and pays for i guess wether i agree with it being there or not i put it there for him.. - Original Message - From: "- Edwin" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, February 24, 2003 12:23 AM Subject: Re: [PHP] and > Hello, > > "Sunfire" <[EMAIL PROTECTED]> wrote: > > > hi.. > > > > i have a button on a web page that is supposted to go to > > another web page > > when either clicked with a mouse or when someone presses enter > > on it.. : > > > > post a prayer > > > > that is my basic code for the button... my problem is the fact > > that when you click the button or hit enter on it all it does > > is refresh the page if it even does that. how would i actually > > make this button load another page > > using php?? > > Just wondering... why would you need a just to load > another page? Aren't links enough? > > - E > > __ > Do You Yahoo!? > Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/11/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] table border colors in html/xml
hi my client just told me that he wants his table borders shown on his web page to be a darker blue than the default color of html web page tables.. does anybody know how to set the color for the table border color? would it be something like: http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/11/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] radio buttons
oh sorry i forgot in the last message too.. he wants 3 radio buttons on a form .. something to the affect of: this is a general post this is an urgent post this is a message i need to post because it bothers me would this be the right setup for radio buttons and if so what is the best way to tell what one of them is checked without using lots of if else statements or is that unavoidable? or is there even a better way to set up radio buttons altogether... i havent worked with radio buttons all that much and dont know that much about them as far as php goes... --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/11/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] and
got it will remember that from now on tnx - Original Message - From: "Larry Brown" <[EMAIL PROTECTED]> To: "PHP List" <[EMAIL PROTECTED]> Sent: Monday, February 24, 2003 12:24 AM Subject: RE: [PHP] and > The onClick should be onClick=window.location("newpage.php") and this has > nothing to do with php. > > Larry S. Brown > Dimension Networks, Inc. > (727) 723-8388 > > -Original Message- > From: Leif K-Brooks [mailto:[EMAIL PROTECTED] > Sent: Monday, February 24, 2003 12:15 AM > To: Sunfire > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] and > > This has nothing to do with PHP, but a button is used to submit a form. > You'll have to create a form with its action set to the page to direct to. > > Sunfire wrote: > > >hi.. > > > >i have a button on a web page that is supposted to go to another web page > >when either clicked with a mouse or when someone presses enter on it.. : > > > >post a prayer > > > >that is my basic code for the button... my problem is the fact that when > you > >click the button or hit enter on it all it does is refresh the page if it > >even does that. how would i actually make this button load another page > >using php?? > > > >tnx > > > > > > > > > >--- > >Outgoing mail is certified Virus Free. > >Checked by AVG anti-virus system (http://www.grisoft.com). > >Version: 6.0.443 / Virus Database: 248 - Release Date: 1/11/2003 > > > > > > > > > > -- > The above message is encrypted with double rot13 encoding. Any unauthorized > attempt to decrypt it will be prosecuted to the full extent of the law. > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/11/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] table border colors in html/xml
sorry.. does anybody know of any mailing list i can join for that then? - Original Message - From: "Dennis Cole" <[EMAIL PROTECTED]> To: "Sunfire" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, February 24, 2003 1:26 AM Subject: RE: [PHP] table border colors in html/xml > > > This isn't a PHP thing. > > > > And you should use > > bordercolor="#FF" > > -Original Message- > From: Sunfire [mailto:[EMAIL PROTECTED] > Sent: Monday, February 24, 2003 1:24 AM > To: [EMAIL PROTECTED] > Subject: [PHP] table border colors in html/xml > > > hi > > my client just told me that he wants his table borders shown on his web page > to be a darker blue than the default color of html web page tables.. does > anybody know how to set the color for the table border color? > > would it be something like: > or is it something different... > > > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.443 / Virus Database: 248 - Release Date: 1/11/2003 > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/11/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] radio buttons
so if the name of radio is "priority" then it needs not be checked for its value other than it being empty? or could i say put that one of those is defaulted to checked... this is a general post . then do in the php script something like: There was an error in your form submission there was an error in your submitted form: you didnt choose a message priority. click here to go back to the form to re-enter your post. - Original Message - From: "Dennis Cole" <[EMAIL PROTECTED]> To: "Sunfire" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, February 24, 2003 1:29 AM Subject: RE: [PHP] radio buttons > Using a case statment would be the easyest way to tell which one was > checked, but technicly one could check all three unless the value of name is > changed the same like ... > > this > is a general post > this > is > an urgent post > this is a > message i need to post because it bothers me > > > -Original Message- > From: Sunfire [mailto:[EMAIL PROTECTED] > Sent: Monday, February 24, 2003 1:30 AM > To: [EMAIL PROTECTED] > Subject: [PHP] radio buttons > > > oh sorry i forgot in the last message too.. > > he wants 3 radio buttons on a form .. something to the affect of: > this > is a general post > this is > an urgent post > this is a > message i need to post because it bothers me > > would this be the right setup for radio buttons and if so what is the best > way to tell what one of them is checked without using lots of if else > statements or is that unavoidable? > > or is there even a better way to set up radio buttons altogether... i havent > worked with radio buttons all that much and dont know that much about them > as far as php goes... > > > > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.443 / Virus Database: 248 - Release Date: 1/11/2003 > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/11/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Mysql DB connect failure
better to use something like mysql_connect("localhost", "test1", "test1")||die(mysql_error()); because you will make smaller code that way killing the script instantly when connection is refused and you will still get the same message: user access denied for '[EMAIL PROTECTED]' using password:(yes) in either case die would be better to use than testing a link variable since in very large amounts of hits on the db that way could cause a test to fall through and do something really uninteresting.. at least thats my experience with that... so if i purposfully make an error: mysql_connect("localhost", "root", "")||die(mysql_error()); i get the message above about the error - Original Message - From: "Hans Prins" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, February 21, 2003 11:07 AM Subject: Re: [PHP] Re: Mysql DB connect failure > > Would you care to explain to the rest of the list how you intend to use > > mysql_error () to return connection failure information? > > > > It returns the text of the error message from previous MySQL operation > > Description: string mysql_error ( [resource link_identifier]) > > > > Seems to me that without a connection, we wouldn't have a valid > > link_identifier. > > maybe so, but it works nonetheless. > > if for example the username stated in the connection initialization was > wrong it will print an error like: > > "Access denied for user: '[EMAIL PROTECTED]' (Using password: YES)" > > MI, > > my code would look somethign like this: > > $link = @mysql_pconnect("localhost", "test1", "test1"); > > // If connection failed... > if (!$link) { > // Inform user of error and quit > print "Couldn't connect to database server\n"; > print mysql_error(); > exit; > } > > > > "Jason K Larson" <[EMAIL PROTECTED]> schreef in bericht > news:[EMAIL PROTECTED] > > Would you care to explain to the rest of the list how you intend to use > > mysql_error () to return connection failure information? > > > > It returns the text of the error message from previous MySQL operation > > Description: string mysql_error ( [resource link_identifier]) > > > > Seems to me that without a connection, we wouldn't have a valid > > link_identifier. > > > > What you probably should attempt going for is getting something back > > from PHP itself regarding the error returned when the mysql_connect > failed. > > > > Here's a snippet from: > > http://www.php.net/manual/en/language.operators.errorcontrol.php > > > > If the track_errors feature is enabled, any error message generated by > > the expression will be saved in the global variable $php_errormsg. This > > variable will be overwritten on each error, so check early if you want > > to use it. > > > > Hope that clears things up a bit. > > > > Regards, > > Jason k Larson > > > > > > > > Hans Prins wrote: > > > did you try: > > > print mysql_error(); > > > > > > "Ml" <[EMAIL PROTECTED]> schreef in bericht > > > news:[EMAIL PROTECTED] > > > > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/11/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] and
this is true i guess but he doesnt want an image that looks like a button he wants a 100% true authentic button that is depressed when you click it and if the image doesnt move when you click on it he will throw a 600% royal fit and none the less he doesnt really care if people with no java support can or cant get to his site .. that is more the less their problem to figure out not mine or his... guess you have to make everybody happy somehow when making web sites and stuff... but i tested a browser with java support turned on and one with it turned off and from what i could see they both worked with the button i have (and my client should be very impressed since the button actually depresses when you click it or hit enter on it).. - Original Message - From: "- Edwin" <[EMAIL PROTECTED]> To: "Sunfire" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, February 24, 2003 1:08 AM Subject: Re: [PHP] and > > "Sunfire" <[EMAIL PROTECTED]> wrote: > > > actually yes a link would be rather nice for just going to > > another page but my client doesnt want a link he is paying for > > a button to be there instead of a link.. so if thats what he > > wants and pays for i guess wether i agree with it being there > > or not i put it there for him.. > > I see. Well, in that case, you have another option. You can make > an image that looks like a "button" and have that image link to > the page in question. One advantage is, it would even work with > Javascript turned off... ;) > > - E > > __ > Do You Yahoo!? > Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] button not opening
sorry.. im confused because i saw this message floating around the list about 4 times last night about 12 hours ago or so and now i just get the original? or is this just another repost again... im confused as to whats going on with how messages are sent out - Original Message - From: "DIKSHA NEEL" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, February 21, 2003 3:21 AM Subject: [PHP] button not opening > hi everybody, > > why isn't anybody replying my last mail subject "button not > opening" > > regards, > diksha. > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] browser dialog boxes
hi was just wondering if there is something with php that will let you create a browser dialog box when someone pushes a submit button or something like that... tnx --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] and
i do have something about the fact that this web site is "user friendly" or not.. and so does the other person that i work with. we tried to tell him that a link would look just fine there and everybody could use it even with very old browsers (if ther are any out there). we also told him for accessability reasons (for screen readers for the blind0) buttons that run from gava or javascript wouldnt work in every situation that came to his web site and that what we are trying to do is make the page usable by "everybody" .. well he said basically that this web site isnt being used for "everybody" and it is only used for pastors that need somewhere to go and get info and relief from problems they might have and dont want to tell people in their church about it. told him that he cant predict every thing out there and maybe a blind or some other disabled pastor came over to his site.. well.. with so many graphical things on the page (table borders dark color on dark color background color) buttons java based graphics that move around and all that nifty stuff.. he basically told me if i want his "$40" to write this prayer request board of his then i will do what he says or we dont get to do anymore with the whole site at all.. well im sort of confused now... what is reasonable price for this client to pay anyways? i mean $40 for like 3 or so hours of work doing html/php/sql for this board..?? i heard of people getting a heck of a lot more than that before but i wouldnt know right at this point since the person that i work for told me i was going to get paid $30/hour for php/sql.. fine but $15 an hour for each language? heck no (at least i dont think so anyways) maybe $30 an hour each for a newbie so if a script had php and sql it would be $60/hour not $30 oh well sorry if i vented and dumped on you all (didnt intend on it but just happened i guess) but let me know what you all think and if there are any better ideas that can be done here... really i am a newbie at php/sql and dont know what is reasonable for being paid.. $30/hour just sounds good but i heard i could do lots better.. let me know]] - Original Message - From: "- Edwin" <[EMAIL PROTECTED]> To: "Sunfire" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, February 24, 2003 8:43 PM Subject: Re: [PHP] and > "Sunfire" <[EMAIL PROTECTED]> wrote: > > > this is true i guess but he doesnt want an image that looks > > like a button he wants a 100% true authentic button that is > > depressed when you click it and if the image doesnt move when > > ? You can make something that can be "depressed" with just > images--only you have to use javascript to make it work... > > > you click on it he will throw a 600% royal fit and none the > > less he doesnt really care if people with no java support can > > or cant get to his site .. that is more the less their problem > > to figure out not mine or his... > > > > guess you have to make everybody happy somehow when making web > > sites and stuff... > > Sounds like you and you're client are not at all concerned about > the *visitors* of your website. Who is going to use the site > anyway? I hope you're client understands the term "user-friendly". > .. > > > but i tested a browser with java support turned on and one with > > it turned off and from what i could see they both worked with > > the button i have (and my client should be very impressed since > > the button actually depresses when you click it or hit enter on > > it).. > > Java and javascript are different--please don't confuse the two... > try it again and see if it'll work with JAVASCRIPT turned off... > > - E > > __ > Do You Yahoo!? > Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] and
well ok that was an interesting little quote about the jokes and stuff... was sort of funny.. anyways yes that is what he wants it for (but... i guess anybody can go to it he says now) but from his worksheets and stuff for reason of the web site it says nothing about general public.. and from talking to him he says also the impression that its not for general public either.. at least thats what he keeps telling me. so if $30 an hour for html and php and sql to be in the same pages + the database setup testing and all that sort isnt good enough for pay what is a good price an hour for that sort of stuff.. i really dont know where to look and i dont know what is the best.. i live in the USA to be exact.. the person i work with is charging really high rates like for a flat straight html page (only 1 page) $80 but for first page he wants $170 and that has standard default text 1 email link 5 other links and 90 graphics.. every page after that is 3$80 unless on maintainence contract and then the prices cheaper by $20 or so.. and all i get is $30/hour and thats doing php html and sql all in the same pages.. i did one web page system for a client of his that took me a few weeks to write cuz i just got into php/sql right then and by the time i got done with it the whole web page system was like 230k on the disk without the db included (ok so i might be a beginner and my code might be a little sloppy but the point is that it works) well i am getting paid $0 for it so i guess its free() and for the client im doing it for he told me the most we can charge for it is $15/hour for any add ons or changes after it goes on the server.. he told me that the system i just got done writing was valued retail at $400 at the least and could be worth more than that but my pay is getting severely discounted from what i can tell (like i said i dont know what a standard fair price to charge would be) he sets up the rates for pay not me.. sigh i have done about 2 months of work and havent seen 1 pay check yet and its getting on my nerves i need money to pay bills not to do code for his clients for free.. but anyways i guess the reason for the very cheap pay for this pastor client is because he is on social security and only gets like $500 a month for money to live off of and cant afford to pay more than $40 for something... need help trying to sort this stuff out.. any body that can help? sorry if this is the wrong kind of post for this list but need to vent out to somewhere... - Original Message - From: "John W. Holmes" <[EMAIL PROTECTED]> To: "'Sunfire'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, February 24, 2003 10:58 PM Subject: RE: [PHP] and > > ... well he said basically that this web site isnt being used > > for > > "everybody" and it is only used for pastors that need somewhere to go > and > > get info and relief from problems they might have and dont want to > tell > > people in their church about it. > > Oh my god!!! So many jokes came to me so quickly that I got dizzy and > passed out and hit my head on the desk!! > > Sounds like a pretty demanding pastor you've got. I guess it's not a sin > to screw a programmer and pay him next to nothing? > > ---John Holmes... > > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] reminder mail when date is within a month of today.
well... $query=mysql_query("select * from TableName where month(FieldNameForDate)=month(FieldOfDate)+1"); that should do it.. or at least it does on mine anyways... - Original Message - From: "Petre Agenbag" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, February 25, 2003 4:07 AM Subject: [PHP] reminder mail when date is within a month of today. > HI > I'm having a bad thinking day. I know it's going to be a very easy > solution, but please humour me. > I have a mysql table with a bunch of subscribers and the date that they > subscribed. > I want to query the table to find all the subscribers who will come up > for renewal within the current month. So, each time I access the page, > it must generate a table with those who's subscription is going to > expire in this month, as well as those who might already be past the > renewal date. > I can handle the generation of the table and all, I'm just not coping > with the query string. > > Thanks > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] file upload and a browse for file box
hi.. i looked in the manual about file uploads and basically know how it works other than a little playing around with it but was wondering how you could make a browse for file button that opens a box on the users computer so then can look for the file rather than type it in.. or is this something with java/javascript that i have to find out elsewhere --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.458 / Virus Database: 257 - Release Date: 2/24/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysqldump
just make a php file with system calls in it to do mysqldump how secure that is is a different question - Original Message - From: "John Taylor-Johnston" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, February 26, 2003 10:43 PM Subject: [PHP] mysqldump > Anyone do MySQLDump using PHP ? > > http://www.mysql.com/doc/en/mysqldump.html > > My code is: > mysqldump -u ** -p ** -A > /home/mybackups/dump_all.sql > > I would like to pull it off using PHP, remotely. > > $date = date ("Ymd"); > $to_path = "/home/MyBackups/$date/dump_all.sql"; > > mysqldump -u ** -p ** -A > $to_path; > > mysqldump is not PHP?! > > John > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.458 / Virus Database: 257 - Release Date: 2/24/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] classes and functions in include files
just a fast question here.. and the lotic probably isnt to bright on my part and i think i know the answer to this question too but just to make sure... if you can include variables in an include file and use them outside that file (in the file that includes that file that is) then can you do the same with classes and functions --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.458 / Virus Database: 257 - Release Date: 2/24/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Very basic If statement still not working VERIFIED VARIABLES
hmmm the question too is where do the variables get assigned and where is the "form" or the query statements to the database for the info you need to print out... maybe its something with that... - Original Message - From: "Stitchin'" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, February 28, 2003 2:03 PM Subject: Very basic If statement still not working VERIFIED VARIABLES > Here's what I've got in my form: > > echo "{$row['designname']} > {$row['designfile']} > {$row['designcomments']} > {$row['applique']} Applique > {$row['puffyfoam']} Puffy Foam > $message1\n"; > > The three designs are coming up: > 1 0 1 Applique > 1 1 0 Puffy Foam > oops oops oops message1 > > This just doesn't make any sense! > > > -Original Message- > From: Roger Davis [mailto:[EMAIL PROTECTED] > Sent: Friday, February 28, 2003 12:50 PM > To: [EMAIL PROTECTED] > Subject: RE: Very basic If statement still not working > > > Why don't you verify what the values are in the variables. If the Variables > are not getting set then you would always see the "oops" in your statement. > Try... > > echo $applique; > echo $puffyfoam; > > Hope this helps > Roger > -Original Message- > From: Stitchin' [mailto:[EMAIL PROTECTED] > Sent: Friday, February 28, 2003 12:01 PM > To: [EMAIL PROTECTED] > Subject: Very basic If statement still not working > > > Boy, this is getting real frustrating ... doesn't this seem to be child's > play? I'm not trying to do anything fancy ... I tried the && and > parentheses suggested below and it still didn't work. I even tried to put > quotes around the zeros and ones thinking maybe the program wasn't > recognizing that they were numbers and it still didn't work > > -Original Message- > The PHP logical AND operator is &&. > > Try > if(($applique == 1) && ($puffyfoam == 0)) etc. > > HTH, > Tore. > > - Original Message - > > > > This is so simple and basic, I must be missing something > > > > I have php code for displaying my embroidery designs on the web page. It's > > going through the mySql database and the query to pull up all the designs > > for a chosen category works fine. I have two fields in my database > > called "applique" and "puffyfoam" both are set up as tinyint(1) > > because all I'm storing there is a zero for no and a 1 for yes. > > > > But for the screen output I don't want these codes to show, I'd like a > com- > > ment to show up. So I set up this "if" statement to place the proper > state- > > ment in a variable to be used in my echo statement (if both answers are > no, > > I don't want to print oops, I just put that there to see where stuff was > > happening)... > > > > > > if($applique == 1 and $puffyfoam == 0) > >{ > > $message1 = "Digitized for APPLIQUE"; > >} > >elseif($applique == 0 and $puffyfoam == 1) > >{ > > $message1 = "Digitized for PUFFY FOAM"; > >} > >elseif($applique == 1 and $puffyfoam == 1) > >{ > > $message1 = "Digitized for APPLIQUE and PUFFY FOAM"; > >} > >else > >{ > > $message1 = "oops"; > >} > > > > I have three records in this category that I've set up with answers to the > > two fields as 1,1 0,1 and 1,0 to see what message would show none > > should show up as "oops" since none are 0,0. I've also put the "applique" > > raw field data in my echo to see if it is pulling up the right answer as > > well ... > > > > The field is showing the correct field info for applique, they're showing > up > > as 1,0,1 BUT every one of the designs are showing the message "oops". > What > > am I doing wrong??? > > > > TIA > > Renee :) > > > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail > <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail > <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > > > > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]>
[PHP] Re: Very basic If statement still not working VERIFIED VARIABLES
i want to say something like this on the results page: now try putting your code for the values here the results just put the the variables here... in your list..dont use the {} thing because it might mess up the parser on things and you might not get what you wanted.. so start your list and just dump the variables in as arrays with the element name as the field name in your table.. maybe that might not work but thats the best i could come up with for now - Original Message - From: "Roger Davis" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, February 28, 2003 2:37 PM Subject: RE: Very basic If statement still not working VERIFIED VARIABLES > In your If statement (if this is still true) you are using... > > > if(($applique == 1) && ($puffyfoam == 0)) etc. > > But in your list you are using > > > {$row['applique']} Applique > > {$row['puffyfoam']} Puffy Foam > > Since I am seeing bits and pieces of code I am not sure that this is right > but try this. > > Before your if statement use this code.. > > $applique=$row['applique']; > $puffyfoam=$row['puffyfoam']; > echo $applique; > echo $puffyfoam; > > This will tell you if the PHP variables are getting set, and will "probably" > make your if statement work. > > Roger > > -Original Message- > From: Stitchin' [mailto:[EMAIL PROTECTED] > Sent: Friday, February 28, 2003 2:04 PM > To: [EMAIL PROTECTED] > Subject: Very basic If statement still not working VERIFIED VARIABLES > > > Here's what I've got in my form: > > echo "{$row['designname']} > {$row['designfile']} > {$row['designcomments']} > {$row['applique']} Applique > {$row['puffyfoam']} Puffy Foam > $message1\n"; > > The three designs are coming up: > 1 0 1 Applique > 1 1 0 Puffy Foam > oops oops oops message1 > > This just doesn't make any sense! > > > -Original Message- > From: Roger Davis [mailto:[EMAIL PROTECTED] > Sent: Friday, February 28, 2003 12:50 PM > To: [EMAIL PROTECTED] > Subject: RE: Very basic If statement still not working > > > Why don't you verify what the values are in the variables. If the Variables > are not getting set then you would always see the "oops" in your statement. > Try... > > echo $applique; > echo $puffyfoam; > > Hope this helps > Roger > -Original Message- > From: Stitchin' [mailto:[EMAIL PROTECTED] > Sent: Friday, February 28, 2003 12:01 PM > To: [EMAIL PROTECTED] > Subject: Very basic If statement still not working > > > Boy, this is getting real frustrating ... doesn't this seem to be child's > play? I'm not trying to do anything fancy ... I tried the && and > parentheses suggested below and it still didn't work. I even tried to put > quotes around the zeros and ones thinking maybe the program wasn't > recognizing that they were numbers and it still didn't work > > -Original Message- > The PHP logical AND operator is &&. > > Try > if(($applique == 1) && ($puffyfoam == 0)) etc. > > HTH, > Tore. > > - Original Message - > > > > This is so simple and basic, I must be missing something > > > > I have php code for displaying my embroidery designs on the web page. It's > > going through the mySql database and the query to pull up all the designs > > for a chosen category works fine. I have two fields in my database > > called "applique" and "puffyfoam" both are set up as tinyint(1) > > because all I'm storing there is a zero for no and a 1 for yes. > > > > But for the screen output I don't want these codes to show, I'd like a > com- > > ment to show up. So I set up this "if" statement to place the proper > state- > > ment in a variable to be used in my echo statement (if both answers are > no, > > I don't want to print oops, I just put that there to see where stuff was > > happening)... > > > > > > if($applique == 1 and $puffyfoam == 0) > >{ > > $message1 = "Digitized for APPLIQUE"; > >} > >elseif($applique == 0 and $puffyfoam == 1) > >{ > > $message1 = "Digitized for PUFFY FOAM"; > >} > >elseif($applique == 1 and $puffyfoam == 1) > >{ > > $message1 = "Digitized for APPLIQUE and PUFFY FOAM"; > >} > >else > >{ > > $message1 = "oops"; > >} > > > > I have three records in this category that I've set up with answers to the > > two fields as 1,1 0,1 and 1,0 to see what message would show none > > should show up as "oops" since none are 0,0. I've also put the "applique" > > raw field data in my echo to see if it is pulling up the right answer as > > well ... > > > > The field is showing the correct field info for applique, they're showing > up > > as 1,0,1 BUT every one of the designs are showing the message "oops". > What > >
[PHP] authentication headers....
how would you show a header message or basically force apache to show an error page of its own like 401 if someone hits cancle on the php auth header function? and i have a line like: header("WWW-Authenticate: basic realm='a realm name'"); //i know what that means look at next line... header("HTTP/1.0 401 Unathorized"); //what does that line do since the first one is the login box //dont know what the second one is for //and third line: echo "stuff to print on screen if person hits cancle... so was wondering how would i use a header on the cancle part and what does the header with unathorized mean --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.458 / Virus Database: 257 - Release Date: 2/24/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] authentication question...
hi basic question about www-authenticate header...(least i hop its simple) i have the code: http://www.grisoft.com). Version: 6.0.458 / Virus Database: 257 - Release Date: 2/24/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php and html differences
hi.. i guess this is a php related question (well sort of) the person i work with decided that he was going to edit a few of my php scripts that make a web page out of variables and just different conditions that happen in the script.. he thought that he could use a gui html editor and edit the page.. well it worked and nothing happened bad... he just left any component alone that had a "/" in them next to the name of it.. well the other thing that happened was in another script i have there is 3 or so web pages built into the script.. based on what happens from the page thet calls that script either one of those 3 pages could be displayed.. well when i told him that depending on what happens with the form that calls that page 1 of 3 pages can come up because certain things are being tested and so on.. he told me a few things that i dont quite understand (or for that matter i dont belive what he says is really true).. he said: 1. on the instance about testing certain conditions to determine what page to show..frames or a frameset can do exactly the same thing...i told him no it didnt (who is right?) 2. he asked me in the scripts that have 3 or more pages built into them how was the logo at the top of the page being shown.. i just told him that i used normal html and put the logo at the top of the pages.. he said frames wont let you do that (who is right??) so im confused about that one.. he also said that plain html had an if else statement in it.. i never heard of such a thing... can somebody get me unconfused? and is it not really a good idea to have 3 or more pages built inside a php script? should the pages be called from the script some way else? tnx --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.458 / Virus Database: 257 - Release Date: 2/24/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php and html differences
well i told him it was probably java or something of the sort cuz he uses java in his pages sometimes expecially when it comes to buttons or something of that sort.. he has done about 24 web sites and all but 2 or 3 are framed based with a minimum of 4 frames in it.. 1 for the logo 1 for a nav bar and 2 for content .. if he doesnt do that then he has a logo fram 2 nav bars and a main content frame.. after that it can get up to 6 or even some pages i seen with 8 frames in it... its annoying and i told him that for people that are visually impared (which he is that himself) or people who use jaws for windows screen reader on their computer frames arent the best thing in the world to use.. i told him that frames can be usefull to a point but overall they suck and moreso its a bad thing to get into for the blind users of his pages.. he has the problem though of saying it doesnt make a bit of difference to him if people have frames turned off or cant display frames or the blind people have a hrd time with it...its their problem and not his.. i told him toput a section in the pages but he absolutely refuses and so whatever i make with php/sql has to fit in a frame 650 pixels wide and we are running into lots of problems trying to get ie and netscape to show the same thing in both browsers.. so i told him to drop the frames and i basically got yelled at for it.. oh well he said that frames are good for the sighted people because it makes things easier to find and makes the page look better...is this true or are frames just utterly useless? if you want a look at some of the stuff we done go to www.wellstonmichigan.com/members/membersmain.htm and take a look... its a front end part of a program i made for his web site... btw i am also totally blind using jaws for windows and even though i have great concepts of where to put stuff on pages he is telling me its all wrong visually and it needs to be redone so he told me where to put stuff and i had to move everything around on it.. if you do take a look at those pages the whole layout was my idea and i wrote it myself without his changes... let me know if i am doing ok with it or if he is right in that m atter.. sorry if this starting to fall outside php line but as far as php goes i think its important things to concider in my php/sql programming life.. i know im not talking direct code but i do need to know if i have layout problems or if the guy is taking his sight for granted... tnx - Original Message - From: "Darren Young" <[EMAIL PROTECTED]> To: "'Sunfire'" <[EMAIL PROTECTED]> Sent: Sunday, March 02, 2003 3:22 PM Subject: RE: [PHP] php and html differences > No, there are no "test" or "conditional" functions inside HTML, perhaps > he's thinking of JavaScript. All HTML does is tells the browser how to > render the page. It's extremely "dumb" and is best that way. The only > thing I can think of at all is SSI or Server Side Includes which _can_ > do some very limited intelligent things. But that tends to be server > specific and isn't used all that much any more. SSI was handy before > dynamic languages were around such as PHP. > > Frames are just bad, it's too bad they were ever designed. All they do > is provide "compartments" to render text on the browser, again there is > no intelligence involved. Now, I could be wrong here since I stopped > using frames many years ago so do some more research. You can always > check the HTML specs at www.w3c.org or on Netscape's developer site. > Netscape came up with the whole frame thing anyways. > > Frames won't let you display a logo? Get this guy a book on HTML and a > clue at Kmart. > > I have MANY PHP pages that build the screen differently depending on the > way it's called. While it may increase the individual page complexity, > it does reduce overall site complexity. I prefer fewer pages doing more > than tons of pages doing little things. > > I'd say overall you're on the right track and should stick to your guns. > > -Original Message- > From: Sunfire [mailto:[EMAIL PROTECTED] > Sent: Sunday, March 02, 2003 2:26 PM > To: [EMAIL PROTECTED] > Subject: [PHP] php and html differences > > > hi.. > > i guess this is a php related question (well sort of) the person i work > with decided that he was going to edit a few of my php scripts that make > a web page out of variables and just different conditions that happen in > the script.. he thought that he could use a gui html editor and edit the > page.. well it worked and nothing happened bad... he just left any > component alone that had a "/" in them next to the name of it.. well the > other thing that happened was in another script i have there is 3 or so > web pages built into th
Re: [PHP] php and html differences
well i have learned how to actually make better choices with the php and how to display certain parts of a page rather than redo the whole page... so i would have a certain web page with a table for example and the first row shows a static text from a db.. lets say its a company name with a phone number.. i found i can do: To: "Sunfire" <[EMAIL PROTECTED]> Sent: Sunday, March 02, 2003 3:32 PM Subject: RE: [PHP] php and html differences > 3 or more possible pages from one php page is what php was designed for. It > dynamically creates the page depending on what choices the client makes or > criteria based on what type of browser the user is using or even where the > client is (subnet). You may be able to streamline the code though to make > things easier to follow and shorten the scripts if you only change a portion > of the page depending on aforementioned criteria rather then rewriting the > entire html 3 or more times. I have never heard of dynamic choices being > made in frames based on html alone. A lot of reference books on html tend > to throw in javascript pieces to help achieve some html authors' desired > effect. To my knowledge it isn't part of html though. > > Larry S. Brown > Dimension Networks, Inc. > (727) 723-8388 > > -Original Message- > From: Sunfire [mailto:[EMAIL PROTECTED] > Sent: Sunday, March 02, 2003 3:26 PM > To: [EMAIL PROTECTED] > Subject: [PHP] php and html differences > > hi.. > > i guess this is a php related question (well sort of) the person i work > with decided that he was going to edit a few of my php scripts that make a > web page out of variables and just different conditions that happen in the > script.. he thought that he could use a gui html editor and edit the page.. > well it worked and nothing happened bad... he just left any component alone > that had a "/" in them next to the name of it.. well the other thing that > happened was in another script i have there is 3 or so web pages built into > the script.. based on what happens from the page thet calls that script > either one of those 3 pages could be displayed.. well when i told him that > depending on what happens with the form that calls that page 1 of 3 pages > can come up because certain things are being tested and so on.. > > he told me a few things that i dont quite understand (or for that matter i > dont belive what he says is really true).. > he said: > 1. on the instance about testing certain conditions to determine what page > to show..frames or a frameset can do exactly the same thing...i told him no > it didnt (who is right?) > 2. he asked me in the scripts that have 3 or more pages built into them how > was the logo at the top of the page being shown.. i just told him that i > used normal html and put the logo at the top of the pages.. he said frames > wont let you do that (who is right??) > > so im confused about that one.. he also said that plain html had an if else > statement in it.. i never heard of such a thing... > > can somebody get me unconfused? and is it not really a good idea to have 3 > or more pages built inside a php script? should the pages be called from the > script some way else? > > tnx > > > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.458 / Virus Database: 257 - Release Date: 2/24/2003 > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.458 / Virus Database: 257 - Release Date: 2/24/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php and html differences
already did that.. he even said whats new... *fear that* if i work for someone like that?? hrm... - Original Message - From: "Leif K-Brooks" <[EMAIL PROTECTED]> To: "Sunfire" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Sunday, March 02, 2003 3:55 PM Subject: Re: [PHP] php and html differences > If I was you, I would tell him he's insane. > > Sunfire wrote: > > >hi.. > > > >i guess this is a php related question (well sort of) the person i work > >with decided that he was going to edit a few of my php scripts that make a > >web page out of variables and just different conditions that happen in the > >script.. he thought that he could use a gui html editor and edit the page.. > >well it worked and nothing happened bad... he just left any component alone > >that had a "/" in them next to the name of it.. well the other thing that > >happened was in another script i have there is 3 or so web pages built into > >the script.. based on what happens from the page thet calls that script > >either one of those 3 pages could be displayed.. well when i told him that > >depending on what happens with the form that calls that page 1 of 3 pages > >can come up because certain things are being tested and so on.. > > > >he told me a few things that i dont quite understand (or for that matter i > >dont belive what he says is really true).. > >he said: > >1. on the instance about testing certain conditions to determine what page > >to show..frames or a frameset can do exactly the same thing...i told him no > >it didnt (who is right?) > >2. he asked me in the scripts that have 3 or more pages built into them how > >was the logo at the top of the page being shown.. i just told him that i > >used normal html and put the logo at the top of the pages.. he said frames > >wont let you do that (who is right??) > > > >so im confused about that one.. he also said that plain html had an if else > >statement in it.. i never heard of such a thing... > > > >can somebody get me unconfused? and is it not really a good idea to have 3 > >or more pages built inside a php script? should the pages be called from the > >script some way else? > > > >tnx > > > > > > > > > >--- > >Outgoing mail is certified Virus Free. > >Checked by AVG anti-virus system (http://www.grisoft.com). > >Version: 6.0.458 / Virus Database: 257 - Release Date: 2/24/2003 > > > > > > > > > > -- > The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. > > > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.458 / Virus Database: 257 - Release Date: 2/24/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php and html differences
- Original Message - From: "Ernest E Vogelsinger" <[EMAIL PROTECTED]> To: "Sunfire" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Sunday, March 02, 2003 5:58 PM Subject: Re: [PHP] php and html differences > At 21:25 02.03.2003, Sunfire said: > [snip] > >i guess this is a php related question (well sort of) the person i work > >with decided that he was going to edit a few of my php scripts that make a > > ... oh my god. your telling me...messed up the whole thing and i had to basically rewrite a 700 line script cuz of it too > > >he told me a few things that i dont quite understand (or for that matter i > >dont belive what he says is really true).. > >he said: > >1. on the instance about testing certain conditions to determine what page > >to show..frames or a frameset can do exactly the same thing...i told him no > >it didnt (who is right?) > > Framesets are HTML constructs to divide a browser window in adjacent areas > to display more than one page at the same time. There's nothing what a > frameset construct can do to implement any logic - the page that's shown in > a frame is available in the "src" tag. yup i got that but he uses frames way too much and it bothers my scripts..i.e. cant always get a table to fit in the frame the way he wants it to.. > > >2. he asked me in the scripts that have 3 or more pages built into them how > >was the logo at the top of the page being shown.. i just told him that i > >used normal html and put the logo at the top of the pages.. he said frames > >wont let you do that (who is right??) > > Not within the frameset, of course... if you have a frameset you don't have > a body, that's it. i mean i hard coded the logo inside of the php script for every page that was in there.. he said frames cant display a logo > > >so im confused about that one.. he also said that plain html had an if else > >statement in it.. i never heard of such a thing... > > Never heard such bullshit. me either... > > >can somebody get me unconfused? and is it not really a good idea to have 3 > >or more pages built inside a php script? should the pages be called from the > >script some way else? > > Boy - some of my applicatinos server a couple of hundred pages out of a > single script (from the database, that is)... > wow a very large script then... must be right on what im doing then... so how do you stop him from editing my scripts with a gui html editor then...ug > > -- >>O Ernest E. Vogelsinger >(\)ICQ #13394035 > ^ http://www.vogelsinger.at/ > > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.458 / Virus Database: 257 - Release Date: 2/24/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php and html differences
where could i get a templet editor from that is good and fairly easy to use? - Original Message - From: "Jason Sheets" <[EMAIL PROTECTED]> To: "Sunfire" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Sunday, March 02, 2003 7:07 PM Subject: Re: [PHP] php and html differences > On Sun, 2003-03-02 at 16:55, Sunfire wrote: > > - Original Message - > > From: "Ernest E Vogelsinger" <[EMAIL PROTECTED]> > > To: "Sunfire" <[EMAIL PROTECTED]> > > Cc: <[EMAIL PROTECTED]> > > Sent: Sunday, March 02, 2003 5:58 PM > > Subject: Re: [PHP] php and html differences > > > > > > > At 21:25 02.03.2003, Sunfire said: > > > [snip] > > > > > > Boy - some of my applicatinos server a couple of hundred pages out of a > > > single script (from the database, that is)... > > > > > wow a very large script then... must be right on what im doing then... so > > how do you stop him from editing my scripts with a gui html editor then...ug > You might consider using a template engine, seperate your HTML from your > PHP logic, that way if he is in charge of the HTML he doesn't touch your > code. I'd suggest using CVS as well or at least making backups so you > don't have to rewrite stuff when someone messes it up. Other than that > you could make it a policy where only you change your scripts, they can > submit patches to you and you can apply them but they don't have direct > edit access to your code. > > Jason > > > > > > > > > > -- > > >>O Ernest E. Vogelsinger > > >(\)ICQ #13394035 > > > ^ http://www.vogelsinger.at/ > > > > > > > > > > > > > > > --- > > Outgoing mail is certified Virus Free. > > Checked by AVG anti-virus system (http://www.grisoft.com). > > Version: 6.0.458 / Virus Database: 257 - Release Date: 2/24/2003 > -- > Jason Sheets <[EMAIL PROTECTED]> > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.458 / Virus Database: 257 - Release Date: 2/24/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mysql query questions
i have a query: mysql_query("update members set where '$edit[company]'='$company") anyways there are 2 sources using this query.. one that needs the $edit[company] marker and another one that uses a $company marker.. any way i can make that 1 query deal with both sources? and i also having a problem with case sensitive searches and query problems with it also... just wondering how you tell the variables contents on comparing in the where clause of the query to be case sensitive...? ' --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.458 / Virus Database: 257 - Release Date: 2/24/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] changing colors on buttons
is there a way you can change the text color on buttons as well as the background color for a button? i have a button that looks like: so is there a way to change text color and background color for that? or is it better to use and do it that way... my client wants light blue buttons with dark blue text on them but we need "real buttons" if you really want to call them that..not images that act like buttons... tnx --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.458 / Virus Database: 257 - Release Date: 2/24/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] query strings
i have a might i say a very very large/long query string i have to run to pass variable values from one page to another with a button... the button works and the query string are passing variables right but at the end of the query string (it passes like 21 variable values) the last variable content that gets passed gets messed up.. i mean if i have like this: page.php?.&edit_company=$company so lets say company has the value of "hi world" in it.. the value is supposed to be passed with "hi world" but for some reason i keep getting "hi%20world" instead of "hi world" any reason for that.. if you need i can post my query string and button code --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.458 / Virus Database: 257 - Release Date: 2/24/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] query strings(still broken)
tried everything except session vars and the query string is still broken... no matter what i do for some reason the browser wants to always put %20 in the middle of my words (i.e. hello world as one var will come out as hello%20world) any other ideas --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.458 / Virus Database: 257 - Release Date: 2/24/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] query strings
ok i will try to reword the question for you jason.. and i will also now that i have a little bit of time post come code too.. i have a form that takes 17 input text fields and 1 textarea field and gives them to a file called addtolist.php. the addtolist.php file has some error checking (of course) and a mysql_query that will insert those 18 variables into a table. now, i added a section of code to that addtolist.php file that checks to see if a record owned by $company already exists. if not just insert the new record.. if so then stop and ask the user what he wants to do with the existing record: modify it (a button) or cancle (a button). if the user hits the modify button then the file addtolist.php will give all 18 variables from the form to the file called editlist.php where an update query does the work. the problem is that all the variables transfer fine as far as im aware of except the last one in the query_string. how would i get the %20 out of the last variable (which happens to be company name). here is my code: //button code //end the button. (sweat that was a lot of code) anyways... the query in editlist.php that is supposed to make this button work: //update query that gets the vars from modify button in addtolist.php hope this helps clear things up... - Original Message - From: "Jason Paschal" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, March 03, 2003 8:57 PM Subject: Re: [PHP] query strings > i think i misinterpreted ur question. > the value gets passed like that due to url encoding, but when you access > that query string variable, it won't be there. > try using the POST method with your form instead if you still have problems. > there are also some PHP functions like encode and unencode i think. > search the php site for them. > > > >From: "Sunfire" <[EMAIL PROTECTED]> > >To: "Jason Paschal" <[EMAIL PROTECTED]> > >Subject: Re: [PHP] query strings > >Date: Mon, 3 Mar 2003 18:32:32 -0500 > > > >how would you use post? the stuff is going from a form to the database but > >a query checks to make sure that record doesnt already exist first...if it > >does i window comes up with 2 buttons.. a modify button (if you push it its > >supposed to update the record) and a cancel button (goes back to main menu) > >if i cant do that how would you use session vars? > > > > > >- Original Message - > >From: "Jason Paschal" <[EMAIL PROTECTED]> > >To: <[EMAIL PROTECTED]> > >Sent: Monday, March 03, 2003 3:36 PM > >Subject: Re: [PHP] query strings > > > > > > > I think there's a limit on the length of a url or query string, > >something > > > like 255 or 256 characters. If I'm passing a lot of data, or I don't > >know > > > how much a user is gonna input but it's possible they can enter a lot, > >then > > > i use POST instead of Get. If a form is not involved, then try saving > >it > >to > > > a database and retrieving it, or using session variables. > > > Hope this helps! > > > Jason > > > > > > > > > > > > > > > > > > > > > >From: "Sunfire" <[EMAIL PROTECTED]> > > > >To: <[EMAIL PROTECTED]> > > > >Subject: [PHP] query strings > > > >Date: Mon, 3 Mar 2003 15:20:02 -0500 > > > > > > > >i have a might i say a very very large/long query string i have to run > >to > > > >pass variable values from one page to another with a button... the > >button > > > >works and the query string are passing variables right but at the end > >of > > > >the > > > >query string (it passes like 21 variable values) the last variable > >content > > > >that gets passed gets messed up.. i mean if i have like this: > > > >page.php?.&edit_company=$company > > > >so lets say company has the value of "hi world" in it.. the value is > > > >supposed to be passed with "hi world" but for some reason i keep > >getting > > > >"hi%20world" instead of "hi world" > > > > > > > >any reason for that.. if you need i can post my query string and button > > > >code > > > > > > > > > > > > > > > > > > > >--- > > > >Outgoing mail is certified Virus Free. > > > >Checked by AVG anti-virus system (http://www.grisoft.com). > > > >Version: 6.0.458 / Virus Database: 257 - Release Date: 2/24/2003 > > > > >
[PHP] question about smarty
just wondering... does smarty have to be installed on the server where the web site or php scripts it makes are going to be ran... or do you just make the stuff and put on the server like normal php files... --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.458 / Virus Database: 257 - Release Date: 2/24/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] question about smarty
k then that wont be able to be a choice for me then... will try maguma studio then.. - Original Message - From: "Rich Gray" <[EMAIL PROTECTED]> To: "Sunfire" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, March 04, 2003 5:58 AM Subject: RE: [PHP] question about smarty > > just wondering... does smarty have to be installed on the server where the > > web site or php scripts it makes are going to be ran... or do you > > just make > > the stuff and put on the server like normal php files... > > No, the Smarty classes and plugins will have to be installed/accessible on > the target server. It can be outside the document root though if it bothers > you... > > HTH > Rich > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.458 / Virus Database: 257 - Release Date: 2/24/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] maguma problems with php 4.3 and apache
hi.. went and installed maguma that has php 4.3 in it and then went to start apache up again after setting up the new php.ini file.. and ran into a few problems.. i keep getting a warning from php: php warning: cant load dynamic library "c:\program files\maguma\php\extensions\php_dbg.dll" a device on your computer isnt functioning. i get this error twice when trying to start apache and then it freezes up.. the only place i can find anything about the extensions_dir= variable is in php.ini so i tried to comment it out and that still didnt work.. i tried putting " around the dir name and it still doesnt work.. also tried checking to see if the file existed and it does.. any reason for that and any way to fix it? tnx --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.458 / Virus Database: 257 - Release Date: 2/24/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] question about smarty
sigh well im sort of crashed my web server right now because maguma decided to mess up a few things with extensions and now dont know how to fix it.. but once i get that fixed i guess i can try smarty and see how that goes.. - Original Message - From: "rush" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, March 04, 2003 9:35 AM Subject: Re: [PHP] question about smarty > "Sunfire" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > k then that wont be able to be a choice for me then... will try maguma > > studio then.. > > I think you have misunderstood the posting, since Smarty can be used in most > web hosting environments. Anyway if you would like to evaluate other > options, you can also give a shot to the TemplateTamer. > > rush > -- > http://www.templatetamer.com/ > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.458 / Virus Database: 257 - Release Date: 2/24/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: and
ok put an example in - Original Message - From: "Boaz Yahav" <[EMAIL PROTECTED]> To: "Sunfire" <[EMAIL PROTECTED]> Sent: Tuesday, March 04, 2003 2:09 PM Subject: and This looks like a great example to add to weberdev. would you care to spend 3 minutes and let other PHP developers enjoy from your knowledge? You are one click away from doing a good deed :) http://www.weberdev.com/index.php3?GoTo=addexample.php3 Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -Original Message- From: Sunfire [mailto:[EMAIL PROTECTED] Sent: Monday, February 24, 2003 7:36 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] and tnx! it works now so now i know what i need to do with buttons that are self created now... - Original Message - From: "erich" <[EMAIL PROTECTED]> To: "Sunfire" <[EMAIL PROTECTED]> Sent: Monday, February 24, 2003 12:11 AM Subject: Re: [PHP] and > i would try > onclick="window.location='postprayer.htm';" > onkeypress="window.location='postprayer.htm'"> > > Sunfire wrote: > > >hi.. > > > >i have a button on a web page that is supposted to go to another web > >page when either clicked with a mouse or when someone presses enter > >on it.. : >onkeypress="postprayer.htm"> post a prayer > >that is my basic code for the button... my problem is the fact that when you > >click the button or hit enter on it all it does is refresh the page > >if it even does that. how would i actually make this button load > >another page using php?? > > > >tnx > > > > > > > > > >--- > >Outgoing mail is certified Virus Free. > >Checked by AVG anti-virus system (http://www.grisoft.com). > >Version: 6.0.443 / Virus Database: 248 - Release Date: 1/11/2003 > > > > > > > > > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/11/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.458 / Virus Database: 257 - Release Date: 2/24/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] maguma problems with php 4.3 and apache
in httpd.conf i have the line: LoadModule php4_module "C:/Program Files/Maguma Studio/php/sapi/php4apache.dll" i get the line when i start apache: [warning]: syntax error on line 860 in httpd.conf: cant load module because the library required for this application cant be found: (1113) review the list of errors above and make notes of them then press [esc] to exit:> any ideas of what the deal is? - Original Message - From: "Barajas, Arturo" <[EMAIL PROTECTED]> To: "'Sunfire'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, March 04, 2003 10:15 AM Subject: RE: [PHP] maguma problems with php 4.3 and apache > Let's check: > > 1. Do you have that file? I think that maguma needs it, but I'm not sure, since I haven't used it. > 2. Do you have the extension_dir pointing to the place where the files should be? > > Extracted from php.ini: > > ; Directory in which the loadable extensions (modules) reside. > extension_dir = C:/php/extensions/ > > Normally it should be pointing to some dir below the main php installation dir. > > In my installation (php 4.2.1), that file doesn't exist. Maybe you could try to find it and mess a little more with php.ini. > -- > Un gran saludo/Big regards... >Arturo Barajas, IT/Systems PPG MX (SJDR) >(427) 271-9918, x448 > > > -Original Message- > > From: Sunfire [mailto:[EMAIL PROTECTED] > > Sent: Martes, 04 de Marzo de 2003 08:46 a.m. > > To: [EMAIL PROTECTED] > > Subject: [PHP] maguma problems with php 4.3 and apache > > > > > > hi.. > > > > went and installed maguma that has php 4.3 in it and then > > went to start > > apache up again after setting up the new php.ini file.. and > > ran into a few > > problems.. i keep getting a warning from php: > > php warning: cant load dynamic library "c:\program > > files\maguma\php\extensions\php_dbg.dll" a device on your > > computer isnt > > functioning. > > i get this error twice when trying to start apache and then > > it freezes up.. > > the only place i can find anything about the extensions_dir= > > variable is in > > php.ini so i tried to comment it out and that still didnt > > work.. i tried > > putting " around the dir name and it still doesnt work.. also > > tried checking > > to see if the file existed and it does.. > > > > any reason for that and any way to fix it? > > > > tnx > > > > > > > > --- > > Outgoing mail is certified Virus Free. > > Checked by AVG anti-virus system (http://www.grisoft.com). > > Version: 6.0.458 / Virus Database: 257 - Release Date: 2/24/2003 > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.458 / Virus Database: 257 - Release Date: 2/24/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] crontab
dont know..i would think you could but i have all my php tasks like crontabs running in windows and they work just fine... hehe didnt think i could do that but when i tried it it worked grin! - Original Message - From: "John Taylor-Johnston" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, March 04, 2003 3:45 PM Subject: [PHP] crontab > Can I run a php script in crontab? > Do I echo or print? > Anyone doing it? > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.458 / Virus Database: 257 - Release Date: 2/24/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] headers and apache
hi having a little problem with apache and its "customizable error messages" i have a basic authentication system here: ##in file called deletepost.php i have:## html for error web page here... #end# now in apache httpd.conf file i was told to do this: ErrorDocument 401 /errors/unauthorized.php #end# after i do all of this i still cant get anything to show up on the web page if someone puts in the wrong username/pwd and i want to change the error message for cancle on the login form to a header error message... the only problem i can see with this is that the actuall working web server might not be able to use my custom error messages and stuff.. but does anybody know how to fix my problem here? tnx for help if can give...