php-windows Digest 17 Oct 2003 00:35:41 -0000 Issue 1959 Topics (messages 21790 through 21796):
Re: Require Session example 21790 by: Sachin Problem in eregi 21791 by: karthikeyan 21792 by: Svensson, B.A.T. (HKG) Error calling php_info 21793 by: Yosvel Reyes 21794 by: Yosvel Reyes 21795 by: Frank M. Kromann $_POST in MySQL query issue... 21796 by: Adam Reiswig Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] ----------------------------------------------------------------------
--- Begin Message ---Hie.. Write a script as follows in the file where you want to unregister variables <? session_start(); session_unregister("sessName"); //to unregister a session variable session_unset(); //to reset the user session ?> visit following link, might be useful to you http://www.digiways.com/articles/php/sessauth/ -- Thanks and Regards Sachin Ramdasi Solversa Technologies Pvt. Ltd. Pune - India http://www.solversa.com Office: (+91) 020 5881741 Cell : (+91) 9822276433 "Sachin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi Rinku > This is is example to use for session : > -------------------------------------------------------------------------- -- > -------------------------------------------- > <? > //first.php > session_start(); // starting session > // session variables must be global > global $sessName; > > $sessName="Rinku"; > session_register("sessName"); > ?> > > Now you can acess this session variable in another php file as follows : > > <? > //second.php > session_start(); // starting session > > echo "Name from the session variable is ".$sessName; // This should display > Rinku > > ?> > > Thanks and Regards > > Sachin Ramdasi > Solversa Technologies Pvt. Ltd. > Pune - India > Office: (+91) 020 5881741 > Cell : (+91) 9822276433 > > "Rinku Shivnani" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Dear all, > > > > I need session example. Can any of you send me some session > > example in php pls. I wd be thankful to you. > > > > > > Regards, > > Rinku
--- End Message ---
--- Begin Message ---Hi Guys, I have some problems in eregi function. Quiclky i need this.. can somebody provide me soln? 1. need to get numbers alone as well as alphabets in a input box. But cannot jus have alpbhabets alone Thanks Regards Karthikeyan.S
--- End Message ---
--- Begin Message ---"[0-9A-Z]*" On Thu, 2003-10-16 at 15:03, karthikeyan wrote: > Hi Guys, > > I have some problems in eregi function. > > Quiclky i need this.. can somebody provide me soln? > 1. need to get numbers alone as well as alphabets in a input box. But > cannot jus have alpbhabets alone > > Thanks > > Regards > Karthikeyan.S > >
--- End Message ---
--- Begin Message ---Hi All: Enviroment: php 4.xx Apache 2.0 Internet Explorer 6.0 Windows OS I'm Just a php beginner and I'm testing some code like <? php_info(); ?> and this code just not work for me i got the following error Fatal error: Call to undefined function: php_info() in D:\Program Files\Apache Group\Apache2\htdocs\Etecsa\index.php on line 2 I have taken this sample code from a php book so I suppose it will work fine... Any Suggestion??? Thanks in advance ========================================== Lic. Yosvel Reyes Fonfria [EMAIL PROTECTED] tel: (053)42 205428 Who try and try again, triumph!!! ========================================== -- http://www.fastmail.fm - Choose from over 50 domains or use your own
--- End Message ---
--- Begin Message ---Hi All: Sorry if this message has been send more than once... I have some problems with my account. Enviroment: php 4.xx Apache 2.0 Internet Explorer 6.0 Windows OS I'm Just a php beginner and I'm testing some code like <? php_info(); ?> and this code just not work for me i got the following error Fatal error: Call to undefined function: php_info() in D:\Program Files\Apache Group\Apache2\htdocs\Etecsa\index.php on line 2 I have taken this sample code from a php book so I suppose it will work fine... Any Suggestion??? Thanks in advance ========================================== Lic. Yosvel Reyes Fonfria [EMAIL PROTECTED] tel: (053)42 205428 Who try and try again, triumph!!! ========================================== -- http://www.fastmail.fm - Access your email from home and the web
--- End Message ---
--- Begin Message ---Hi, The correct function name is phpinfo(); without the underscore. - Frank > Hi All: > > Enviroment: php 4.xx Apache 2.0 Internet Explorer 6.0 Windows OS > > I'm Just a php beginner and I'm testing some code like > > <? > php_info(); > ?> > > and this code just not work for me i got the following error > > Fatal error: Call to undefined function: php_info() in D:\Program > Files\Apache Group\Apache2\htdocs\Etecsa\index.php on line 2 > > I have taken this sample code from a php book so I suppose it will work > fine... > > > Any Suggestion??? > Thanks in advance > > > > ========================================== > Lic. Yosvel Reyes Fonfria > [EMAIL PROTECTED] > tel: (053)42 205428 > > Who try and try again, triumph!!! > ========================================== > > -- > http://www.fastmail.fm - Choose from over 50 domains or use your own > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
--- End Message ---
--- Begin Message --- Greetings to all. I am trying for the life of me to place a $_POST[] variable in my MySQL query. I am running the latest stable versions of PHP, MySQL and Apache 2 on my Win2kPro machine. My register_globals are set to off in my php.ini. My code I am attempting create is basically as follows:
$table="elements"; $sql="insert into $table set Name = '$elementName'";
This works with register_globals set to on. But, I want to be able to turn that off. My code then, I am guessing, be something as follows:
$table="elements"; $sql="insert into $table set Name = '$_POST["elementName"]'";
Unfortunately this and every other combination I can think of, combinations of quotes that is, does not work. I believe the source of the problem is the quotes within quotes within quotes. I also tried:
$sql='insert into $table set Name = '.$_POST["elementName"]; or $sql="insert into $table set Name = ".$_POST['elementName'];
and several other variations.
Can anyone give me some pointers to inserting $_POST[] statements inside of query statements? I am sure there must be a way but I have spent a lot of time on this and am really stumped here. Thanks for any help.
-Adam Reiswig
PS if anything here is not clear to you, please let me know and I'll clarify as I can. Thanks again.
--- End Message ---