Re: [PHP-DB] value error in PHP form
Thanks Zak, Its really amazing. It worked Properly. Thanks once again. Rinku Zachary Krakov [EMAIL PROTECTED] wrote: Hi Rinku, The statement syntax that I believe will work you is the following: If (($VARIABLE1 !== '') ($VARIABLE2 !== '')) { print Rinku; } Let me know if this works. Hope this helps. Best, -Zak From: Rinku Date: Thu, 24 Jun 2004 03:07:12 -0700 (PDT) To: Zachary Krakov Cc: Subject: Re: [PHP-DB] value error in PHP form Hi Zak, Thanks for your suggestion. It really worked. Now pls answer for the query described below : I had written the code : if(isset($_POST['Variable1'])isset($_POST['Variable2'])) { Print Rinku; } Here, even if variables are not set then even I am getting Output as Rinku. Could you pls answer for the query. Thanks, Rinku Zachary Krakov wrote: Hi Rinku, One problem I see is that the HTML tags appear to be off... Your HTML is improperly formatted, which could be causing rendering anomalies to occur, in addition to the register globals issue which I'll mention shortly. Please correct your HTML code to read: HTML_BODY_HERE Two, Like Kenny said, change the register_globals = Off directive in your PHP.ini file to register_globals = On so that variables are carried from your form values into your post-processing PHP print functions. Hope this helps, Best, -Zak On 6/20/04 4:34 AM, Kenny wrote: This could be due to register globals on/off Use print $_POST['action']; print $_POST['Name']; Kenny -Original Message- From: Rinku [mailto:[EMAIL PROTECTED] Sent: 20 June 2004 12:23 To: [EMAIL PROTECTED] Subject: [PHP-DB] value error in PHP form Dear All, I have installed PHP on WinXp. I am using MySql as Backend on Apache server. Now the problem is.. I am writing this code : [input] [input] print $action; print $Name; ? Here I should get output as LoginRinku But I am getting nothing. Can any of you guide me on this? Regards, Rinku - Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php - Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php - Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses.
Re: [PHP-DB] value error in PHP form
Hi Zak, Thanks for your suggestion. It really worked. Now pls answer for the query described below : I had written the code : if(isset($_POST['Variable1'])isset($_POST['Variable2'])) { Print Rinku; } Here, even if variables are not set then even I am getting Output as Rinku. Could you pls answer for the query. Thanks, Rinku Zachary Krakov [EMAIL PROTECTED] wrote: Hi Rinku, One problem I see is that the HTML tags appear to be off... Your HTML is improperly formatted, which could be causing rendering anomalies to occur, in addition to the register globals issue which I'll mention shortly. Please correct your HTML code to read: HTML_BODY_HERE Two, Like Kenny said, change the register_globals = Off directive in your PHP.ini file to register_globals = On so that variables are carried from your form values into your post-processing PHP print functions. Hope this helps, Best, -Zak On 6/20/04 4:34 AM, Kenny wrote: This could be due to register globals on/off Use print $_POST['action']; print $_POST['Name']; Kenny -Original Message- From: Rinku [mailto:[EMAIL PROTECTED] Sent: 20 June 2004 12:23 To: [EMAIL PROTECTED] Subject: [PHP-DB] value error in PHP form Dear All, I have installed PHP on WinXp. I am using MySql as Backend on Apache server. Now the problem is.. I am writing this code : [input] [input] print $action; print $Name; ? Here I should get output as LoginRinku But I am getting nothing. Can any of you guide me on this? Regards, Rinku - Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php - Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage!
Re: [PHP-DB] value error in PHP form
Hi Rinku, The statement syntax that I believe will work you is the following: If (($VARIABLE1 !== '') ($VARIABLE2 !== '')) { print Rinku; } Let me know if this works. Hope this helps. Best, -Zak From: Rinku [EMAIL PROTECTED] Date: Thu, 24 Jun 2004 03:07:12 -0700 (PDT) To: Zachary Krakov [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] value error in PHP form Hi Zak, Thanks for your suggestion. It really worked. Now pls answer for the query described below : I had written the code : if(isset($_POST['Variable1'])isset($_POST['Variable2'])) { Print Rinku; } Here, even if variables are not set then even I am getting Output as Rinku. Could you pls answer for the query. Thanks, Rinku Zachary Krakov [EMAIL PROTECTED] wrote: Hi Rinku, One problem I see is that the HTML tags appear to be off... Your HTML is improperly formatted, which could be causing rendering anomalies to occur, in addition to the register globals issue which I'll mention shortly. Please correct your HTML code to read: HTML_BODY_HERE Two, Like Kenny said, change the register_globals = Off directive in your PHP.ini file to register_globals = On so that variables are carried from your form values into your post-processing PHP print functions. Hope this helps, Best, -Zak On 6/20/04 4:34 AM, Kenny wrote: This could be due to register globals on/off Use print $_POST['action']; print $_POST['Name']; Kenny -Original Message- From: Rinku [mailto:[EMAIL PROTECTED] Sent: 20 June 2004 12:23 To: [EMAIL PROTECTED] Subject: [PHP-DB] value error in PHP form Dear All, I have installed PHP on WinXp. I am using MySql as Backend on Apache server. Now the problem is.. I am writing this code : [input] [input] print $action; print $Name; ? Here I should get output as LoginRinku But I am getting nothing. Can any of you guide me on this? Regards, Rinku - Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php - Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] value error in PHP form
On Thursday 24 June 2004 18:07, Rinku wrote: I had written the code : if(isset($_POST['Variable1'])isset($_POST['Variable2'])) { Print Rinku; } Here, even if variables are not set then even I am getting Output as Rinku. Some form elements, eg input type=text ..., are always isset() even when you haven't entered anything into them. If you want to check that something has been entered into them then use: if (!empty($POST['doo'] ... but depending on what type of inputs your application accepts you may have to do further tests. -- 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-db -- /* QOTD: Don't let your mind wander -- it's too little to be let out alone. */ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] value error in PHP form
Thank you very much Kim, Its really very much useful to me. I was trying to fing the sollution from a long time. At last you had answered me. Thanks Once Again. Regards, Rinku Kim Steinhaug [EMAIL PROTECTED] wrote: Or $_GET[action]; $_GET[Name]; Do yourself a HUGE favour and start using _GET and _POST right away on all queries. Also look into the well known problems with addslashes with globals on while your at it. On php.net there are good explernations and examples, look into the reslash() and deslash() example. One of theese days youll wake up and globals are off by default. (Well, isnt PHP5 off?) The problem is, your are used to program with globals on... If you have like 50 clients who wakes up with globals off you are inn for a bad day (or week... ) When I first started with PHP I loved the globals, but the last year they have really pissed me off mostly. The best thing you can do is be sure your software works with globals off, and then take it for a test drive with globals on. It may sound trivial and annoying to read, but this is one of the major buggers of programming PHP - so do it now, :) You wont regret it I promise you. -- -- Kim Steinhaug -- There are 10 types of people when it comes to binary numbers: those who understand them, and those who don't. -- www.steinhaug.com - www.easywebshop.no - www.webkitpro.com -- Kenny wrote in message news:[EMAIL PROTECTED] This could be due to register globals on/off Use print $_POST['action']; print $_POST['Name']; Kenny -Original Message- From: Rinku [mailto:[EMAIL PROTECTED] Sent: 20 June 2004 12:23 To: [EMAIL PROTECTED] Subject: [PHP-DB] value error in PHP form Dear All, I have installed PHP on WinXp. I am using MySql as Backend on Apache server. Now the problem is.. I am writing this code : [input] [input] print $action; print $Name; ? Here I should get output as LoginRinku But I am getting nothing. Can any of you guide me on this? Regards, Rinku - Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php - Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage!
Re: [PHP-DB] value error in PHP form
Hi. You left out the 'php' after the '?'. So it should read: ?php print $action; print $Name; ? See if that helps any. ~Philip body form name=frmname input type=text name=Name value=Rinku input type=submit name=action value=Login ? print $action; print $Name; ? /form /body /html -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] value error in PHP form
Hi. You left out the 'php' after the '?'. So it should read: Actually this is most likely a register_globals issue. try. $_GET['action'] or $_POST['action']. you'll only need to use ?php if short_tags = off in your php.ini. HTH Jeff ?php print $action; print $Name; ? See if that helps any. ~Philip body form name=frmname input type=text name=Name value=Rinku input type=submit name=action value=Login ? print $action; print $Name; ? /form /body /html -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] value error in PHP form
This could be due to register globals on/off Use print $_POST['action']; print $_POST['Name']; Kenny -Original Message- From: Rinku [mailto:[EMAIL PROTECTED] Sent: 20 June 2004 12:23 To: [EMAIL PROTECTED] Subject: [PHP-DB] value error in PHP form Dear All, I have installed PHP on WinXp. I am using MySql as Backend on Apache server. Now the problem is.. I am writing this code : html head title /head /title head body form name=frmname input type=text name=Name value=Rinku input type=submit name=action value=Login ? print $action; print $Name; ? /form /body /html Here I should get output as LoginRinku But I am getting nothing. Can any of you guide me on this? Regards, Rinku - Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] value error in PHP form
Actually I want to use the function like if($action=Login) { Statements; } But here I am not getting any value in $action even I click on it. When I was using Linux at that time I had not this kind of problem. Rinku Marvin Hechanova [EMAIL PROTECTED] wrote: You have to assign values to your name and action e.g. [input] value=Rinku [input] type=submit value=Submit Query value=Login but why would you want to print the results? On Sun, 20 Jun 2004 04:22:59 -0700 (PDT), Rinku wrote: Dear All, I have installed PHP on WinXp. I am using MySql as Backend on Apache server. Now the problem is.. I am writing this code : [input] [input] print $action; print $Name; ? Here I should get output as LoginRinku But I am getting nothing. Can any of you guide me on this? Regards, Rinku - Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! - Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers!
Re: [PHP-DB] value error in PHP form
Maybe this might work -- html head title/title /head body ?php # check if the form has been submitted and action = login if(isset($_POST['action'])$_POST['action']==Login) print $_POST['action']; print $_POST['Name']; # more statements ... ? form name=frmname action=?php print $_SERVER['PHP_SELF']; ? method=post input type=text name=Name value=Rinku / input type=submit name=action value=Login / /form /body /html -- - Original Message - From: Rinku [EMAIL PROTECTED] To: Marvin Hechanova [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Sunday, June 20, 2004 2:18 PM Subject: Re: [PHP-DB] value error in PHP form Actually I want to use the function like if($action=Login) { Statements; } But here I am not getting any value in $action even I click on it. When I was using Linux at that time I had not this kind of problem. Rinku Marvin Hechanova [EMAIL PROTECTED] wrote: You have to assign values to your name and action e.g. [input] value=Rinku [input] type=submit value=Submit Query value=Login but why would you want to print the results? On Sun, 20 Jun 2004 04:22:59 -0700 (PDT), Rinku wrote: Dear All, I have installed PHP on WinXp. I am using MySql as Backend on Apache server. Now the problem is.. I am writing this code : [input] [input] print $action; print $Name; ? Here I should get output as LoginRinku But I am getting nothing. Can any of you guide me on this? Regards, Rinku - Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! - Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] value error in PHP form
Or $_GET[action]; $_GET[Name]; Do yourself a HUGE favour and start using _GET and _POST right away on all queries. Also look into the well known problems with addslashes with globals on while your at it. On php.net there are good explernations and examples, look into the reslash() and deslash() example. One of theese days youll wake up and globals are off by default. (Well, isnt PHP5 off?) The problem is, your are used to program with globals on... If you have like 50 clients who wakes up with globals off you are inn for a bad day (or week... ) When I first started with PHP I loved the globals, but the last year they have really pissed me off mostly. The best thing you can do is be sure your software works with globals off, and then take it for a test drive with globals on. It may sound trivial and annoying to read, but this is one of the major buggers of programming PHP - so do it now, :) You wont regret it I promise you. -- -- Kim Steinhaug -- There are 10 types of people when it comes to binary numbers: those who understand them, and those who don't. -- www.steinhaug.com - www.easywebshop.no - www.webkitpro.com -- Kenny [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] This could be due to register globals on/off Use print $_POST['action']; print $_POST['Name']; Kenny -Original Message- From: Rinku [mailto:[EMAIL PROTECTED] Sent: 20 June 2004 12:23 To: [EMAIL PROTECTED] Subject: [PHP-DB] value error in PHP form Dear All, I have installed PHP on WinXp. I am using MySql as Backend on Apache server. Now the problem is.. I am writing this code : html head title /head /title head body form name=frmname input type=text name=Name value=Rinku input type=submit name=action value=Login ? print $action; print $Name; ? /form /body /html Here I should get output as LoginRinku But I am getting nothing. Can any of you guide me on this? Regards, Rinku - Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php