Re: [PHP] how to change index.php?passwd to index.php in the address bar

2003-08-14 Thread murugesan
Thanks for the message. Actually I tried only html files in the beginning.
Let me explain my problem.

I want to open a new window in  a link with a function as
function newwindow()
{
window.open("/home.php?userid=user1","Homepage");
}

when I click the link

 now the address bar has the following address

http://localhost/home.php?userid=user1

How can I remove the "?userid=user1" in the address bar.


I used method = POST for a button to go to new page. That worked well. So
with a link how can I achieve this.

-Murugesan

- Original Message -
From: "David Otton" <[EMAIL PROTECTED]>
To: "murugesan" <[EMAIL PROTECTED]>
Cc: "PHP List" <[EMAIL PROTECTED]>
Sent: Wednesday, August 13, 2003 3:48 PM
Subject: Re: [PHP] how to change index.php?passwd to index.php in the
address bar


> On Wed, 13 Aug 2003 14:18:13 +0530, you wrote:
>
> In your first post you say
>
> >   When go to a new page from login page the address bar has
> >localhost/regsuccess.php?password="ASD"
>
> But in your second,
>
> >Method Not Allowed
> >The requested method POST is not allowed for the URL /products.html.
> >Apache/1.3.19 Server at localhost
> >Any one is there to reaolve my problem
>
> These are different files (regsuccess.php and products.html). It sounds
like
> the action attribute on your form is pointing to the wrong place. By
default
> Apache won't let HTML files deal with POST data, for obvious reasons.
>
>


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



Re: [PHP] php.ini configuration can we have two include_path in php.in file

2003-08-14 Thread murugesan
  I am not able to locate the file you are referring to. Please do help
me I am very much frustrated.

-Murugesan
- Original Message -
From: "Justin French" <[EMAIL PROTECTED]>
To: "murugesan" <[EMAIL PROTECTED]>
Cc: "PHP List" <[EMAIL PROTECTED]>
Sent: Thursday, August 14, 2003 2:29 PM
Subject: Re: [PHP] php.ini configuration can we have two include_path in
php.in file


> The include_path can be set via a .htaccess file on a per-directory
> basis... so, at the root of your "second" apache server, you could have
> a file called .htaccess with something like:
>
> ---
> 
> php_flag register_globals off
> php_value include_path '/path/to/your/include/dir/'
> 
> ---
>
> Have fun,
>
> Justin
>
>
>
>
> On Thursday, August 14, 2003, at 06:39  PM, murugesan wrote:
> > I am running an apache.In the php.ini file I have defined the
> > include path.
> > Now I want to run another apache in different port. The thing is that
> > for
> > that apache I need another include path in the php.ini file.
> > Is there any way to achieve this to have two include_path in the
> > php.ini
> > file.
>
>


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



[PHP] php.ini configuration can we have two include_path in php.in file

2003-08-14 Thread murugesan
Hello all,
I am running an apache.In the php.ini file I have defined the
include path.
Now I want to run another apache in different port. The thing is that for
that apache I need another include path in the php.ini file.
Is there any way to achieve this to have two include_path in the php.ini
file.

-Murugesan.


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



Re: [PHP] PHP - MySQL Query...

2003-08-14 Thread murugesan
Try this,
$result = mysql_query($query,$dbh);
-Murugesan


- Original Message -
From: "Jay Blanchard" <[EMAIL PROTECTED]>
To: "Steven Kallstrom" <[EMAIL PROTECTED]>; "PHP List"
<[EMAIL PROTECTED]>
Sent: Thursday, August 14, 2003 4:50 PM
Subject: RE: [PHP] PHP - MySQL Query...


[snip]
$dbh = mysql_connect("localhost", "login", "password") or
die('cannot connect to the database because: ' . mysql_error());
mysql_select_db("database");

$query = 'SELECT * FROM cities';
$result = mysql_query($query);

 while ($row = mysql_fetch_row($result)) {
echo (' ' . $row[0] . ', ' . $row[1] . '
' . $row[2] . ' ' . $row[3] . " \n"); }

getting this error:

*Warning*: mysql_fetch_row(): supplied argument is not a valid MySQL
result resource in...

so... is the problem with the $query?
I don't see anything wrong (assuming my login and database selection is
correct)
what are the common errors here?
[/snip]

mysql_query needs both the query variable and the connection
variable
mysql_query($query, $dbh);

HTH!

--
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] how to change index.php?passwd to index.php in the address bar

2003-08-14 Thread murugesan
  Can you explain me in detail to use the post method.
Thanks,
Murugesan

- Original Message -
From: "Peter James" <[EMAIL PROTECTED]>
To: "murugesan" <[EMAIL PROTECTED]>
Cc: "PHP List" <[EMAIL PROTECTED]>
Sent: Wednesday, August 13, 2003 12:12 PM
Subject: Re: [PHP] how to change index.php?passwd to index.php in the
address bar


> Use the post method?
>
> --
> Peter James
> Editor-in-Chief, php|architect Magazine
> [EMAIL PROTECTED]
>
> php|architect
> The Magazine for PHP Professionals
> http://www.phparch.com
>
>
> - Original Message -
> From: "murugesan" <[EMAIL PROTECTED]>
> To: "Robert Cummings" <[EMAIL PROTECTED]>; "Kris Reid"
<[EMAIL PROTECTED]>
> Cc: "PHP List" <[EMAIL PROTECTED]>
> Sent: Wednesday, August 13, 2003 12:28 AM
> Subject: [PHP] how to change index.php?passwd to index.php in the address
> bar
>
>
> > Hello all,
> >When go to a new page from login page the address bar has
> > localhost/regsuccess.php?password="ASD"
> > I don't want the things that comes after ? in the URL
> > How can I resolve this issue?.
> >
> > Thanks in advance,
> > Murugesan
> >
> > --
> > 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] What does -> mean?

2003-08-14 Thread murugesan
This some thing like C++ this pointer.
Actually $this refers to current class object pointer in C++.

>  $this->vendor = $vendor;

It seems that you could have defined vendor in a class which should have a
field named vendor.
Got it ?

-murugesan


- Original Message -
From: "James Johnson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 14, 2003 12:44 PM
Subject: [PHP] What does -> mean?


> Hello,
>
> I've searched through Zend and php.net and can't find the answer.
>
> In the following code:
>
>  $this->vendor = $vendor;
>
> What does the -> mean or do?
>
> Thanks,
> James
>
>
> --
> 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] how to change index.php?passwd to index.php in the address bar

2003-08-14 Thread murugesan
Hello all,
   When go to a new page from login page the address bar has
localhost/regsuccess.php?password="ASD"
I don't want the things that comes after ? in the URL
How can I resolve this issue?.

Thanks in advance,
Murugesan

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



Re: [PHP] how to change index.php?passwd to index.php in the address bar

2003-08-14 Thread murugesan
I used the post method in the form tag. But I am getting the following error

Method Not Allowed
The requested method POST is not allowed for the URL /products.html.
Apache/1.3.19 Server at localhost
Any one is there to reaolve my problem

Regards,
Murugesan.

- Original Message -
From: "Peter James" <[EMAIL PROTECTED]>
To: "murugesan" <[EMAIL PROTECTED]>
Cc: "PHP List" <[EMAIL PROTECTED]>
Sent: Wednesday, August 13, 2003 12:12 PM
Subject: Re: [PHP] how to change index.php?passwd to index.php in the
address bar


> Use the post method?
>
> --
> Peter James
> Editor-in-Chief, php|architect Magazine
> [EMAIL PROTECTED]
>
> php|architect
> The Magazine for PHP Professionals
> http://www.phparch.com
>
>
> - Original Message -
> From: "murugesan" <[EMAIL PROTECTED]>
> To: "Robert Cummings" <[EMAIL PROTECTED]>; "Kris Reid"
<[EMAIL PROTECTED]>
> Cc: "PHP List" <[EMAIL PROTECTED]>
> Sent: Wednesday, August 13, 2003 12:28 AM
> Subject: [PHP] how to change index.php?passwd to index.php in the address
> bar
>
>
> > Hello all,
> >When go to a new page from login page the address bar has
> > localhost/regsuccess.php?password="ASD"
> > I don't want the things that comes after ? in the URL
> > How can I resolve this issue?.
> >
> > Thanks in advance,
> > Murugesan
> >
> > --
> > 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] Clone of Hotmail,yahoo

2003-08-14 Thread murugesan
  The page with TO CC BCC is in a frame (say frame1)
Upon clicking the link TO we open a new window. After that u can fetch the
users input and can open the frame1 with the users input as argument to the
previous window.

murugesan.
- Original Message -
From: "Balaji Nallathambi" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 14, 2003 11:17 AM
Subject: [PHP] Clone of Hotmail,yahoo


> Hi all
> I want to implement the same functionality of how yahoo and hotmail had
done.
>
> In the yahoo or Hotmail after siginin
> When click Compose a new window will be opened for compose.
> In the Compose Page they are links like (TO,CC, Bcc)
> on clicking these links a small window will open nothing but the address
book. IF any any mail Id is selected there and clicked OK then the
corresponding EditBox will be filled.
>
> I don;t have any idea of how to implement it. i.e the TextBox so a present
Page shoulg get the value from the other independent form.
>
> Any Ideas or Src Code is there. How to implement it wheather to use
JavaScript or PHP
>
> Advance Thanks
> Balaji.N
>
>
> -
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!


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



[PHP] How to connect to DB

2003-08-16 Thread murugesan
Hello all,
I have some existing php pages already. Now I want to change the DB
to point to another DB.

I have changed the include_path in php.ini file to point to /home/config
Also I changed the constant db_name defined in a file in
/home/config/con.php to point to new DB.

[snip]
<<<<<<<<<
include "con.php"
@mysql_pconnect(db_host,db_user,db_pass);
mysql_select_db (db_name) or die ("could not select db");
<<<<<<<<<<

<<<<<<<<<<<<<<<<<
//contents of con.php




<<<<<<<<<<<<<<
Also I restarted the apache.
But it is still accessing the old DB.
What are all the changes that I have to make. other than these changes.

Regards,
Murugesan.


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



[PHP] Problem in sending mail

2003-08-18 Thread murugesan
Hello all,
[snip]

$subject="Welcome";
$from  = "MIME-Version: 1.0\r\n";
$from .= "Content-type: text/html; charset=iso-8859-1\r\n";
$from .= "From: <[EMAIL PROTECTED]>\r\n";
$subject="Welcome";

mail($mailid,$subject,$message1,$from);


But I am not able to send the message.
Eve n I checked mail return type. It is also working well.
But I am not recieveing mail.

Any ideas?

-Murugesan

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



[PHP] window.open("hai.php?id="one");

2003-08-18 Thread murugesan
Hello all,
I need to pass a value from one page to another.This is done from  a
link from page 1 to page 2.
In that I called a php file as

window.open("hai.php?id="one");
But I dont want ?id="one" to be displayed in the address bar.
How can I achieve this?.

-murugesan.


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



Re: [PHP] window.open("hai.php?id="one");

2003-08-18 Thread murugesan

I have made the value hidden. How can I retrieve it in the next page in
php.

-murugesan

- Original Message -
From: "Martin Towell" <[EMAIL PROTECTED]>
To: "'murugesan'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, August 19, 2003 11:21 AM
Subject: RE: [PHP] window.open("hai.php?id="one");


> Hiya,
>
> 1. Turn off the address bar
>
> or
>
> 2. Create a form with hidden elements, with method=post
> open a window to a blank page, and name the window
> submit the form to the newly, named, window
>
> HTH
> Martin
>
> -Original Message-
> From: murugesan [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, 19 August 2003 3:45 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] window.open("hai.php?id="one");
>
>
> Hello all,
> I need to pass a value from one page to another.This is done from
a
> link from page 1 to page 2.
> In that I called a php file as
>
> window.open("hai.php?id="one");
> But I dont want ?id="one" to be displayed in the address bar.
> How can I achieve this?.
>
> -murugesan.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> __ Information from NOD32 1.481 (20030812) __
>
> This message was checked by NOD32 for Exchange e-mail monitor.
> http://www.nod32.com
>
>
>
>


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



Re: [PHP] Apache starting error

2003-08-20 Thread murugesan
Check this
http://www.phpbuilder.com/mail/php-general/262/0811.php
-murugesan
- Original Message - 
From: "Rikunj" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 20, 2003 11:53 AM
Subject: [PHP] Apache starting error


> Hello all,
> 
> I am new to this group please do not ignore..
> 
> I am running redhat 7.1 Linux Apache/1.3.27 (Unix).
> 
> The server got restarted due to power malfunction. After it restarted
> again it is unable to start httpd service display below error.
> 
> [warn] Loaded DSO libexec/libphp4.so uses plain Apache 1.3 API, this
> module might crash under EAPI! (please recompile it with -DEAPI)
> 
> What should I do to repair it?
> 
> Thanks in advance for any help.
> 
> Rp...
> 
> 
> 
> -- 
> 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] How to open random Flash page with hyperlink?

2003-08-21 Thread murugesan
Hello 
some more changes
 
 

-murugesan

- Original Message - 
From: "Cody Phanekham" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 22, 2003 9:32 AM
Subject: RE: [PHP] How to open random Flash page with hyperlink?


Phillip,

pretty close. only a few things that are missing/incorrect.
my corrections are marked by a #


> -Original Message-
> From: Phillip Pang [mailto:[EMAIL PROTECTED]
> // random_menu.html
> 
>  $i = rand(0,3);
> ?>
> 
> 
> 
> x
# you need to go back to php mode to use $i
x

> 
> 
> ---
> 
> // random.php
> 
>  $i = $_post["i"];
# im pretty sure the value would be past via the GET method as the user would be 
clicking the hyperlink, so it should look like
$i = $_GET["i"];

> 
> if ($i = = 0){
# there shouldnt be any spaces for the comparison
if ($i == 0){

> $value = "a";
> }
> else if ($i = = 1){
# there shouldnt be any spaces for the comparison
else if ($i == 1){

> $value = "b";
> }
> ...etc.
# dont forget to get out of php mode
?>

> 
> 
> 
> 
> 
# need to go back to php mode to use $value
     

> 
# need to go back to php mode to use $value
 

> 
> 
> 
> Please help if you know how to do this. Thanks in advance.
> 
> phil*

-murugesan


Re: [PHP] How to open random Flash page with hyperlink?

2003-08-22 Thread murugesan
Thanks for the message.
Can you please tell me how to do session authentication?.

-murugesan
- Original Message -
From: "Cody Phanekham" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 22, 2003 10:05 AM
Subject: FW: [PHP] How to open random Flash page with hyperlink?


-Original Message-
> From: murugesan [mailto:[EMAIL PROTECTED]
>  some more changes
>  
>  

Murugesan,

both ways are correct. Its just that i'm used to using the short open tag :)


<http://au.php.net/manual/en/configuration.directives.php#ini.short-open-tag
>
http://au.php.net/manual/en/configuration.directives.php#ini.short-open-tag


short_open_tag  <http://au.php.net/manual/en/language.types.boolean.php>
boolean


Tells whether the short form () of PHP's open tag should be allowed. If
you want to use PHP in combination with XML, you can disable this option in
order to use  inline. Otherwise, you can print it with PHP, for
example: . Also if disabled, you must
use the long form of the PHP open tag ().

Note: This directive also affects the shorthand mailto:[EMAIL PROTECTED]>
[EMAIL PROTECTED]>
To: <  <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]>
Sent: Friday, August 22, 2003 9:32 AM
Subject: RE: [PHP] How to open random Flash page with hyperlink?


Phillip,

pretty close. only a few things that are missing/incorrect.
my corrections are marked by a #


> -Original Message-
> From: Phillip Pang [mailto:[EMAIL PROTECTED]
> // random_menu.html
> 
>  $i = rand(0,3);
> ?>
> 
>
> 
> http://www.x.com/random.php?i=$i>
www.x.com/random.php?i=$i">x
# you need to go back to php mode to use $i
http://www.x.com/random.php?i> www.x.com/random.php?i=">x

> 
>
> ---
>
> // random.php
> 
>  $i = $_post["i"];
# im pretty sure the value would be past via the GET method as the user
would be clicking the hyperlink, so it should look like
$i = $_GET["i"];

>
> if ($i = = 0){
# there shouldnt be any spaces for the comparison
if ($i == 0){

> $value = "a";
> }
> else if ($i = = 1){
# there shouldnt be any spaces for the comparison
else if ($i == 1){

> $value = "b";
> }
> ...etc.
# dont forget to get out of php mode
?>

> 
>
> 
> 
> 
# need to go back to php mode to use $value
 

> 
# need to go back to php mode to use $value
 

> 
> 
>
> Please help if you know how to do this. Thanks in advance.
>
> phil*

-murugesan




*
This e-mail, including any attachments to it, may contain confidential
and/or personal information.
If you have received this e-mail in error, you must not copy, distribute, or
disclose it, use or take any action
based on the information contained within it.

Please notify the sender immediately by return e-mail of the error and then
delete the original e-mail.

The information contained within this e-mail may be solely the opinion of
the sender and may not necessarily
reflect the position, beliefs or opinions of Salmat on any issue.

This email has been swept for the presence of computer viruses known to
Salmat's anti-virus systems.

For more information, visit our website at  www.salmat.com.au.

*


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



Re: [PHP] Easy XML & PHP tutorials ?????

2003-08-24 Thread murugesan
www.w3schools.com

-murugesan
- Original Message - 
From: "Boaz Yahav" <[EMAIL PROTECTED]>
To: "Joe Harman" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, August 24, 2003 1:09 AM
Subject: RE: [PHP] Easy XML & PHP tutorials ?


Try this too : http://www.sitepoint.com/article/1165

Sincerely
 
berber
 
Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.
Share your code : http://addexample.weberdev.com
Search for PHP Code from your browser http://toolbar.weberdev.com


-Original Message-
From: Joe Harman [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 22, 2003 1:16 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Easy XML & PHP tutorials ?


Hello all. does anyone have any very easy XML tutorials . I have a
simple weather feed I want to implement. but no XML experience

thanks

Joe Harman




 
 

-- 
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] start_session()

2003-08-24 Thread murugesan
Can any one say what it the purpose of start_session()
fuction
-murugesan.

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



[PHP] Passing values from one page to another

2003-08-25 Thread murugesan
Hello all,

[snip]


//Page0.php
Enter



//page1.php

function submitform()
{
   //Check for empty values in text box
}




>






//page2.php


In page 1 I am able to get the value 1 of empid.
But in page 2 I am not  able to get it.
Any solutions

-murugesan

Re: [PHP] mysql_connect error

2003-08-25 Thread murugesan
This is working for me.

---
  define('db_host','localhost');
  define('db_name','mydb') ;
  define('db_user','use1') ;
  define('db_pass','pwd1') ;
  $h = @mysql_pconnect(db_host,db_user,db_pass);
  if($h)
  mysql_select_db (db_name) or die ("could not select db");;
---
-murugesan

- Original Message -
From: "Mjec" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 25, 2003 7:53 AM
Subject: Re: [PHP] mysql_connect error


on 25/08/2003 12:11 PM, John W. Holmes at [EMAIL PROTECTED] wrote:

> Mjec wrote:
>
>> Hi,
>>
>> again this line is causing problems:
>>
>> $h =
>>
mysql_connect('localhost',constant("mysql_user"),constant("mysql_password"))
>> ;
>>
>> Aparantly a parse error.  Idaes?
>
> Is there a reason you're using constant()??
>
> Try: $h = mysql_connect('localhost', mysql_user, mysql_password);
>
> One thing to note about parse errors. If PHP says you have a parse error
> on line 8 (for example), that means there is an error somewhere before
> OR on line 8. The line PHP gives is just the point where it realized
> something was wrong, but the cause could be on a previous line.

Error line 43 (or 42 if 43 commented out and 42 uncommented)

 38: define("mysql_password", "did you think");
 39: define("mysql_user", 'i would say this');
 40:
 41: // Initialize MySQL database
 42: // $h =
mysql_connect('localhost',constant("mysql_user"),constant("mysql_password"))
;
 43: $h = mysql_connect('localhost',mysql_user,mysql_password);
 44: mysql_select_db('mjec_mjecnet', $h);

ideas?

--mjec

--
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] How to open random Flash page with hyperlink?

2003-08-25 Thread murugesan
Thanks for the information.
In the code you provided

if ((!$passwd) || (!$username)) // user hasnt logged in
 {
  .

Actually I have implemented this in a separate page.

That is upon sign up of the  in the index page
I call a new page auth.php
In that file
I have done this authentication and called the function
header ("Location: /main.php?empid=$empid&pwd=$pwd");

Actually when passing this URL the password appears in the address bar.
How to over come this? It will be very much usefull if I get the answer.

Thanks in advance
-Murugesan


-
Ok lets say you want every user to login before they can access other parts
of your site.

index.php:

  window.location='main.php'
";
  }
}
?>

main.php:

window.location='index.php'
  ";
}
else
{
  // display page
  ...
}
?>


if a user tries to access main.php directly without logging in they will be
redirected to index.php

checkout http://www.php.net/manual/en/ref.session.php for more information


>
>
> Thanks for the message.
> Can you please tell me how to do session authentication?.
>
> -murugesan

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



Re: [PHP] How to open random Flash page with hyperlink?

2003-08-25 Thread murugesan
Really thanks for the support. It worked well.

-regards,
Murugesan

- Original Message -
From: "Cody Phanekham" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 25, 2003 11:06 AM
Subject: RE: [PHP] How to open random Flash page with hyperlink?


Murugesan,

I'll assume your redirecting the user to main.php because (s)he has passed
the authentication routine... in that case just store the username and
password as a session variable that way you wont need to pass the username
and password via the url.

auth.php, [just before the call to header()]:


then in main.php you need to start your session to access the session
variables
your employee id = $empid and the password you typed was $pwd";
?>


> -Original Message-
> From: murugesan [mailto:[EMAIL PROTECTED]
> Sent: Monday, 25 August 2003 15:18
> To: Cody Phanekham; [EMAIL PROTECTED]
> Subject: Re: [PHP] How to open random Flash page with hyperlink?
>
>
> Thanks for the information.
> In the code you provided
>
> if ((!$passwd) || (!$username)) // user hasnt logged in
>  {
>   .
>
> Actually I have implemented this in a separate page.
>
> That is upon sign up of the  in the index page
> I call a new page auth.php
> In that file
> I have done this authentication and called the function
> header ("Location: /main.php?empid=$empid&pwd=$pwd");
>
> Actually when passing this URL the password appears in the
> address bar.
> How to over come this? It will be very much usefull if I get
> the answer.
>
> Thanks in advance
> -Murugesan
> --
> --
> --
> --
> -
> Ok lets say you want every user to login before they can
> access other parts
> of your site.
>
> index.php:
>  session_name("mysessionname");
> session_start();
> session_register("s_authed");
> $s_authed = 0; // initialize session flag
>
> if ((!$passwd) || (!$username)) // user hasnt logged in
> {
>   // display login form
>   ...
> }
> else
> {
>   // retrieve database username and password here
>   ...
>   // check if they match
>   if (($db_passwd == $passwd) && ($db_username == $username))
>   {
> $s_authed = 1; // user has been authorised
> // redirect to real page
> echo "
> 
>   window.location='main.php'
> ";
>   }
> }
> ?>
>
> main.php:
>  session_name("mysessionname");
> session_start();
> if (!$s_authed) // check access
> {
>   // user hasnt been authorised, therefore redirect to login page
>   echo "
>   
> window.location='index.php'
>   ";
> }
> else
> {
>   // display page
>   ...
> }
> ?>
>
>
> if a user tries to access main.php directly without logging
> in they will be
> redirected to index.php
>
> checkout http://www.php.net/manual/en/ref.session.php for
> more information
>
>
> >
> >
> > Thanks for the message.
> > Can you please tell me how to do session authentication?.
> >
> > -murugesan
>



*
This e-mail, including any attachments to it, may contain confidential
and/or personal information.
If you have received this e-mail in error, you must not copy, distribute, or
disclose it, use or take any action
based on the information contained within it.

Please notify the sender immediately by return e-mail of the error and then
delete the original e-mail.

The information contained within this e-mail may be solely the opinion of
the sender and may not necessarily
reflect the position, beliefs or opinions of Salmat on any issue.

This email has been swept for the presence of computer viruses known to
Salmat's anti-virus systems.

For more information, visit our website at  www.salmat.com.au.

*

--
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] Unable to get the values in next page

2003-08-25 Thread murugesan
I did as what you said. But the problem now is that I am not able to get the
values in the next page.

index.php
--
session_name("mysessionname");
session_start();
--->

auth.php
-
$failed="yes";
session_register('failed');
header ("Location: /main.php");
->

main.php
-
echo $failed;// this is null here
->

What might be the problem ?

Thanks in advance,
Murugesan.



> Murugesan,
>
> I'll assume your redirecting the user to main.php because (s)he has passed
> the authentication routine... in that case just store the username and
> password as a session variable that way you wont need to pass the username
> and password via the url.
>
> auth.php, [just before the call to header()]:
>session_register('empid');
>   session_register('pwd');
>   header ("Location: /main.php");
> ?>
>
> then in main.php you need to start your session to access the session
> variables
>session_name("yoursessionname");
>   session_start();
>   // you now have access to $empid and $pwd
>   echo "your employee id = $empid and the password you typed was
$pwd";
> ?>
>
>
> > -Original Message-
> > From: murugesan [mailto:[EMAIL PROTECTED]
> > Sent: Monday, 25 August 2003 15:18
> > To: Cody Phanekham; [EMAIL PROTECTED]
> > Subject: Re: [PHP] How to open random Flash page with hyperlink?
> >
> >
> > Thanks for the information.
> > In the code you provided
> >
> > if ((!$passwd) || (!$username)) // user hasnt logged in
> >  {
> >   .
> >
> > Actually I have implemented this in a separate page.
> >
> > That is upon sign up of the  in the index page
> > I call a new page auth.php
> > In that file
> > I have done this authentication and called the function
> > header ("Location: /main.php?empid=$empid&pwd=$pwd");
> >
> > Actually when passing this URL the password appears in the
> > address bar.
> > How to over come this? It will be very much usefull if I get
> > the answer.
> >
> > Thanks in advance
> > -Murugesan
> > --
> > --
> > --
> > --
> > -
> > Ok lets say you want every user to login before they can
> > access other parts
> > of your site.
> >
> > index.php:
> >  > session_name("mysessionname");
> > session_start();
> > session_register("s_authed");
> > $s_authed = 0; // initialize session flag
> >
> > if ((!$passwd) || (!$username)) // user hasnt logged in
> > {
> >   // display login form
> >   ...
> > }
> > else
> > {
> >   // retrieve database username and password here
> >   ...
> >   // check if they match
> >   if (($db_passwd == $passwd) && ($db_username == $username))
> >   {
> > $s_authed = 1; // user has been authorised
> > // redirect to real page
> > echo "
> > 
> >   window.location='main.php'
> > ";
> >   }
> > }
> > ?>
> >
> > main.php:
> >  > session_name("mysessionname");
> > session_start();
> > if (!$s_authed) // check access
> > {
> >   // user hasnt been authorised, therefore redirect to login page
> >   echo "
> >   
> > window.location='index.php'
> >   ";
> > }
> > else
> > {
> >   // display page
> >   ...
> > }
> > ?>
> >
> >
> > if a user tries to access main.php directly without logging
> > in they will be
> > redirected to index.php
> >
> > checkout http://www.php.net/manual/en/ref.session.php for
> > more information
> >
> >
> > >
> > >
> > > Thanks for the message.
> > > Can you please tell me how to do session authentication?.
> > >
> > > -murugesan

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



Re: [PHP] RE: Unable to get the values in next page

2003-08-25 Thread murugesan
Thanks for the reply.Actually I don't know that I have to include the
start_session in every page.
I GOT it ATLAST.

Regards
-murugesan.


- Original Message -
From: "Cody Phanekham" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 25, 2003 12:26 PM
Subject: [PHP] RE: Unable to get the values in next page


> main.php
> -
> echo $failed;// this is null here
> ->

did you start the session in main.php before "echo $failed;"? eg



> -Original Message-
> From: murugesan [mailto:[EMAIL PROTECTED]
> Sent: Monday, 25 August 2003 16:46
> To: Cody Phanekham; [EMAIL PROTECTED]
> Subject: Unable to get the values in next page
>
>
> I did as what you said. But the problem now is that I am not
> able to get the
> values in the next page.
>
> index.php
> --
> session_name("mysessionname");
> session_start();
> --->
>
> auth.php
> -
> $failed="yes";
> session_register('failed');
> header ("Location: /main.php");
> ----->
>
> main.php
> -
> echo $failed;// this is null here
> ->
>
> What might be the problem ?
>
> Thanks in advance,
> Murugesan.
>
>
>
> > Murugesan,
> >
> > I'll assume your redirecting the user to main.php because
> (s)he has passed
> > the authentication routine... in that case just store the
> username and
> > password as a session variable that way you wont need to
> pass the username
> > and password via the url.
> >
> > auth.php, [just before the call to header()]:
> >  >   session_register('empid');
> >   session_register('pwd');
> >   header ("Location: /main.php");
> > ?>
> >
> > then in main.php you need to start your session to access
> the session
> > variables
> >  >   session_name("yoursessionname");
> >   session_start();
> >   // you now have access to $empid and $pwd
> >   echo "your employee id = $empid and the password you typed was
> $pwd";
> > ?>
> >
> >
> > > -Original Message-
> > > From: murugesan [mailto:[EMAIL PROTECTED]
> > > Sent: Monday, 25 August 2003 15:18
> > > To: Cody Phanekham; [EMAIL PROTECTED]
> > > Subject: Re: [PHP] How to open random Flash page with hyperlink?
> > >
> > >
> > > Thanks for the information.
> > > In the code you provided
> > >
> > > if ((!$passwd) || (!$username)) // user hasnt logged in
> > >  {
> > >   .
> > >
> > > Actually I have implemented this in a separate page.
> > >
> > > That is upon sign up of the  in the index page
> > > I call a new page auth.php
> > > In that file
> > > I have done this authentication and called the function
> > > header ("Location: /main.php?empid=$empid&pwd=$pwd");
> > >
> > > Actually when passing this URL the password appears in the
> > > address bar.
> > > How to over come this? It will be very much usefull if I get
> > > the answer.
> > >
> > > Thanks in advance
> > > -Murugesan
> > > --
> > > --
> > > --
> > > --
> > > -
> > > Ok lets say you want every user to login before they can
> > > access other parts
> > > of your site.
> > >
> > > index.php:
> > >  > > session_name("mysessionname");
> > > session_start();
> > > session_register("s_authed");
> > > $s_authed = 0; // initialize session flag
> > >
> > > if ((!$passwd) || (!$username)) // user hasnt logged in
> > > {
> > >   // display login form
> > >   ...
> > > }
> > > else
> > > {
> > >   // retrieve database username and password here
> > >   ...
> > >   // check if they match
> > >   if (($db_passwd == $passwd) && ($db_username == $username))
> > >   {
> > > $s_authed = 1; // user has been authorised
> > > // redirect to real page
> > > echo "
> > > 
> > >   window.location='main.php'
> > > ";
> > >   }
> > > }
> > > ?>
> > >
> > > main.php:
> 

[PHP] Window.status message

2003-08-25 Thread murugesan
Hello all,
I have  a proble in showing the window message

[snip]
echo "Click here ";

Here on mouse over it is not displaying hai message in the status bar.
Instead when I move the mouse on the link and then after moving the mouse
apart from the link it displays the hai message in the status bar.
What might be the problem?

-murugesan

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



[PHP] window.status

2003-08-25 Thread murugesan
Hello all,
I have cleared the stage of changing the window status on mouse over
and on mouse out.
echo "Click here";
When I keep on pressing my left mouse button it is displaying the URL in the
status bar.
How to remove the status?
Any one there to help me?

-Murugesan

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



Re: [PHP] RE: Unable to get the values in next page

2003-08-25 Thread murugesan
 I thought of including the script in all the files.Thanks for the message.

Regards,
Murugesan

- Original Message -
From: "Cody Phanekham" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 25, 2003 12:50 PM
Subject: RE: [PHP] RE: Unable to get the values in next page


NP.

You only have to start a session if you want to access any session variable.
You could always including the code in a header.inc file that gets included
in every php script, that way you wont forget to start the session.

> -Original Message-
> From: murugesan [mailto:[EMAIL PROTECTED]
> Sent: Monday, 25 August 2003 17:14
> To: Cody Phanekham; [EMAIL PROTECTED]
> Subject: Re: [PHP] RE: Unable to get the values in next page
>
>
> Thanks for the reply.Actually I don't know that I have to include the
> start_session in every page.
> I GOT it ATLAST.
>
> Regards
> -murugesan.
>
>
> - Original Message -
> From: "Cody Phanekham" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, August 25, 2003 12:26 PM
> Subject: [PHP] RE: Unable to get the values in next page
>
>
> > main.php
> > -
> > echo $failed;// this is null here
> > ->
>
> did you start the session in main.php before "echo $failed;"? eg
>  session_name("mysessionname");
> session_start();
> ?>
>
>
> > -Original Message-
> > From: murugesan [mailto:[EMAIL PROTECTED]
> > Sent: Monday, 25 August 2003 16:46
> > To: Cody Phanekham; [EMAIL PROTECTED]
> > Subject: Unable to get the values in next page
> >
> >
> > I did as what you said. But the problem now is that I am not
> > able to get the
> > values in the next page.
> >
> > index.php
> > --
> > session_name("mysessionname");
> > session_start();
> > --->
> >
> > auth.php
> > -----
> > $failed="yes";
> > session_register('failed');
> > header ("Location: /main.php");
> > ->
> >
> > main.php
> > -
> > echo $failed;// this is null here
> > ->
> >
> > What might be the problem ?
> >
> > Thanks in advance,
> > Murugesan.
> >
> >
> >
> > > Murugesan,
> > >
> > > I'll assume your redirecting the user to main.php because
> > (s)he has passed
> > > the authentication routine... in that case just store the
> > username and
> > > password as a session variable that way you wont need to
> > pass the username
> > > and password via the url.
> > >
> > > auth.php, [just before the call to header()]:
> > >  > >   session_register('empid');
> > >   session_register('pwd');
> > >   header ("Location: /main.php");
> > > ?>
> > >
> > > then in main.php you need to start your session to access
> > the session
> > > variables
> > >  > >   session_name("yoursessionname");
> > >   session_start();
> > >   // you now have access to $empid and $pwd
> > >   echo "your employee id = $empid and the password
> you typed was
> > $pwd";
> > > ?>
> > >
> > >
> > > > -Original Message-
> > > > From: murugesan [mailto:[EMAIL PROTECTED]
> > > > Sent: Monday, 25 August 2003 15:18
> > > > To: Cody Phanekham; [EMAIL PROTECTED]
> > > > Subject: Re: [PHP] How to open random Flash page with hyperlink?
> > > >
> > > >
> > > > Thanks for the information.
> > > > In the code you provided
> > > >
> > > > if ((!$passwd) || (!$username)) // user hasnt logged in
> > > >  {
> > > >   .
> > > >
> > > > Actually I have implemented this in a separate page.
> > > >
> > > > That is upon sign up of the  in the index page
> > > > I call a new page auth.php
> > > > In that file
> > > > I have done this authentication and called the function
> > > > header ("Location: /main.php?empid=$empid&pwd=$pwd");
> > > >
> > > > Actually when passing this URL the password appears in the
> > > > address bar.
> > > > How to over come this? It will be very much usefull if I get
> > > > the answer.
> > > >
> > > > Thanks in advan

Re: [PHP] Unable to get the values in next page

2003-08-25 Thread murugesan
Thanks for the help.
I got it worked. The mistake I did was that I failed to call session_start()
in the next page.

-Murugesan
- Original Message -
From: "Burhan" <[EMAIL PROTECTED]>
To: "murugesan" <[EMAIL PROTECTED]>
Sent: Monday, August 25, 2003 3:29 PM
Subject: Re: [PHP] Unable to get the values in next page


> Quoting murugesan <[EMAIL PROTECTED]>:
>
> [ trim ]
>
> > main.php
> > -
> > echo $failed;// this is null here
> > ->
>
> Try echo $_SESSION['failed'];
>
> --
> Burhan
> phplist[at]meidomus[dot]com
> http://www.meidomus.com
>

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



[PHP] Session problem in back button

2003-08-25 Thread murugesan
Hello all,
Now i have a problem in back button.
After signing in when I click back button It goes to login page. But
when I click the forward button it is going to the main page.
How can I prevent this.

-murugesan

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



Re: [PHP] Session problem in back button

2003-08-26 Thread murugesan
Seems confusing.

-
//include.php
session_name("sessionname");
session_start();
-->>
This was added in a separate file and included that file in all the files
including index.php
In index.php I registered a variable s_authed and initialised it to 0

-
//index.php
include "include.php";
session_register("s_authed");
$s_authed = 0; // initialize session flag
->>

And after sign up I am authenticating the user in a separate file
and setting a flag s_authed to 1
-
//auth.php
if(check for authentication)
{
   
   $HTTP_SESSION_VARS['s_authed']=1;
}
->>
Now in the main.php
I am checking
-
//main.php

if($s_authed==1)
{
   //Display login form code goes here
}
else
{
display "authentication required";
}
->>



This is working fine. Even when I copy and paste the URL to another browser
it is showing authentication required page.
When I used

if (!isset($_SESSION['sessionname']))
{
   //Display login form code goes here
}

in main.php
it is not working. I mean that it display the page even when I copy and
paste URL in a new browser window.

Seems like an essay :)
Why is it so.
Is that my previous method was correct or any mistakes I did?



-murugesan






- Original Message -
From: "Paul Fitzpatrick" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 26, 2003 10:43 PM
Subject: RE: [PHP] Session problem in back button


>
> Hi,
>
> This will stop them seeing the login once they are in a registered
> session
> Only diplay the login form if NOT a registered session variable
> 'sessionname' (or some other session variable)
>
>
> If (!isset($_SESSION['sessionname']))
> {
>//Display login form code goes here
> }
>
> Cheers.
>
>
>
>
> -Original Message-
> From: murugesan [mailto:[EMAIL PROTECTED]
> Sent: Monday, August 25, 2003 9:55 AM
> To: murugesan; Cody Phanekham; [EMAIL PROTECTED]
> Subject: [PHP] Session problem in back button
>
> Hello all,
> Now i have a problem in back button.
> After signing in when I click back button It goes to login page.
> But
> when I click the forward button it is going to the main page.
> How can I prevent this.
>
> -murugesan
>
> --
> 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] determine how many checkboxes are selected.

2003-08-26 Thread murugesan
First count the number of entries($count)  to be displayed in the page.
Accordingly assign the names

for($i=0;$i< $count;$i++)
{
 $chkval="chkv".$i;
 $chkfun="chkf".$i;
 echo "";
echo "
";
//display record $i
 echo "
  function $chkfun()
  {
   if(document.forms[0].$chkval.value=='off')
document.forms[0].$chkval.value='on';
   else
document.forms[0].$chkval.value='off';
  }";
}

and upon subbmitting the form
you can determine the checked entries.

-murugesan


- Original Message -
From: "Angelo Zanetti" <[EMAIL PROTECTED]>
To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Sent: Tuesday, August 26, 2003 10:36 AM
Subject: [PHP] determine how many checkboxes are selected.


>
>
> Hi I have a tabel that gets populated dynamically from a DB query. Each
row
> is a seperate record and they all have a checkbox. I want to put a
> button/image @ after the table and when it is click ed to determine which
> checkboxes have beeen selected. I also name the checkboxes dynamically
with
> chk being the prefix and the record ID the suffix eg record 56: chk56
would
> be the name of that particular checkbox.
>
> If anyone could help with this design issue I would appreciate it!
> Or any advice will be great as well.
>
> angelo
>
> TIA
>
> --
> 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] MD5 System Password check with PHP

2003-08-26 Thread murugesan
First store the password in the DB as 
$passwd=md5($passwd)
insert into table values( $passwd);

get the user password and check by comparing
if(md5($password)==$fetchedpasswdfromDB)
{
...
}

-murugesan

- Original Message - 
From: "Chinmoy Barua" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 26, 2003 11:34 AM
Subject: [PHP] MD5 System Password check with PHP


> Hello everybody,
> 
> I want to authenticate my user from web with PHP
> script. The user's passwords are stored in System as
> MD5 format (in /etc/shadow). 
> 
> Can anybody help me?
> 
> - Chinmoy
> 
> 
> __
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
> 
> -- 
> 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] Cannot pass values from one page to another

2003-08-26 Thread murugesan
Hello all,
I have passed a value from 
index.php?uid="one"

I got this value in next page(main.php)
But from there I am not able to pass it to next page
I used 
session_register('uid');
in main.php
but in next page $uid is returning null

Any solutions?
-murugesan

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



Re: [PHP] Cannot pass values from one page to another

2003-08-26 Thread murugesan
Thanks for the message.
I looked into the manual.
But it is not working.
Ofcourse I used session_start in every pages.

-murugesan

- Original Message - 
From: "Jay Blanchard" <[EMAIL PROTECTED]>
To: "murugesan" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, August 26, 2003 5:23 PM
Subject: RE: [PHP] Cannot pass values from one page to another


[snip]
I got this value in next page(main.php)
But from there I am not able to pass it to next page
I used 
session_register('uid');
in main.php
but in next page $uid is returning null
[/snip]

First, look at the manual for sessions. You have posted many questions
where the manual would have provided you a solution. 

Are you placing session_start() at the top of each page where you expect
session variables to be available? You should be...

Have a pleasant day.

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



Re: [PHP] beginner: remove the string after the first whitespace

2003-08-28 Thread murugesan
This code is working for me



-murugesan
- Original Message - 
From: "Andras Kende" <[EMAIL PROTECTED]>
To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Sent: Thursday, August 28, 2003 10:03 AM
Subject: [PHP] beginner: remove the string after the first whitespace


> 
> Hello All,
> 
> I have a very simple question:
> 
> Want to remove the string after the first whitespace like:
> 
> "here is a text what i have"
> to:
> "here"
> 
> 
> Thanks !!
> 
> Andras Kende
> 
> -- 
> 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] PHP Interview questions

2003-08-29 Thread murugesan
In a group of 12 eggs only one is having weight less or more.
Can we have a program to find the egg, provided we have to weigh only three
times with a weighing machine with two pans,without using weights.

-murugesan
- Original Message -
From: "Matt Matijevich" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 29, 2003 2:55 AM
Subject: RE: [PHP] PHP Interview questions


> 
> Can you do it programmitically (with pseudo-code)? After all, we need
> to
> keep this on-topic :)
> 
>
>
> not pseudo code and it could definatley be cleaned up or done better
> but her is my quick try at it
>
> echo "We are walking to up to a fork in the road.";
> $randval = rand(1, 500);
> $randval2 = rand(1, 500);
> $randval3 = rand(1, 500);
>
>
> if ( $randval&1 )
> {
> $man1 = "truth";
> $man2 = "lie";
>
> }
> else
> {
> $man1 = "lie";
> $man2 = "truth";
> }
>
>
> if ( $randval3&1 )
> {
> $road1 = "Utpoia";
> $road2 = "Black Forest";
>
> }
> else
> {
> $road1 = "Black Forest";
> $road2 = "Utpoia";
> }
>
> if ( $randval2&1 ) $manToAsk = "Man 1";
> else $manToAsk = "Man 2";
>
>
>
> if ($manToAsk == "Man 1") {
> echo "We are asking Man 1Man 1, where would Man 2 point if
> I asked him to point to the road to Utopia?";
> if (man1() == "Road 1") {
> echo "Man 1 pointed to Road 1";
> $roadToTake = "Road 2";
> }
> else {
> echo "Man 1 pointed to Road 2";
> $roadToTake = "Road 1";
> }
> }
> else {
> echo "We are asking Man 2Man 2, where would Man 1 point if
> I asked him to point to the road to Utopia?";
> if (man2() == "Road 1") {
> echo "Man 2 pointed to Road 1";
> $roadToTake = "Road 2";
> }
> else {
> echo "Man 2 pointed to Road 2";
> $roadToTake = "Road 1";
> }
> }
>
>
> echo "We are taking $roadToTakeRoad 1 goes to $road1Road 2
> goes to $road2Man 1 = $man1Man 2 = $man2";
> //echo "We took $roadToTakeWe asked $manToAskMan 1 =
> $man1Man 2 = $man2Road 1 goes to $road1Road 2 goes to
> $road2";
>
> function man1() {
> global $man1,$man2,$road1,$road2;
> if ($man1 != "truth") {
> if ( $road1 == 'Black Forest' ) return 'Road 1';
> else return 'Road 2';
> }
> else {
> if ( $road1 == 'Black Forest' ) return 'Road 1';
> else return 'Road 2';
> }
> }
>
> function man2(){
> global $man1,$man2,$road1,$road2;
> if ($man2 != "truth") {
> if ( $road1 == 'Black Forest' ) return 'Road 1';
> else return 'Road 2';
> }
> else {
> if ( $road1 == 'Black Forest' ) return 'Road 1';
> else return 'Road 2';
> }
> }
>
> --
> 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] problem with a mysql query with data from a form

2003-08-29 Thread murugesan
use
$det=trim($det);
then assign the $sql value.
-murugesan

- Original Message -
From: "Vincent Fievet" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 29, 2003 11:55 AM
Subject: [PHP] problem with a mysql query with data from a form



-Message d'origine-
De : Vincent Fievet
Envoyé : mercredi 27 août 2003 10:44
À : '[EMAIL PROTECTED]'
Objet : problem with a mysql query with data from a form


hi,

i am a newbie to php and mysql, i run the easyphp kit ( php 4.2.0, Mysql
3.23.49 and phpmyadmin 2.2.6 )

i would like to use a select * from mytable where my variable like
'%$mystring%'
where $mystring come from a form



   '%Mike %
Communication Impliquant :
 
  
PC
   echo
  ...
  H10 Tango
   
  
 
1
...
10
  
  
 
  

so ,after choosing "PC" in the form,  in show.php i do a

$sql="SELECT * FROM journal WHERE a like '% $det%' OR de like '%$det%' order
by dateheure desc";
echo $sql;
and what i get is :

SELECT * FROM journal WHERE a like '%PC %' OR de like '%PC %' order by
dateheure desc
( note the blank space at the end of PC )
whitch doesnt get any record since the word i am looking is "PC" and not "PC
"
i used a "like" because the request should be used to find record with "PC
1" "PC" "PC 9" "PC12" ...

any ideas ?

Thanx

Vincent Fievet

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



Re: [PHP] PHP Interview questions and how to pass parameters to .js files

2003-09-02 Thread murugesan
I think this program will work under the condition that the fault one is
heavier in weight, but the case is that it may be "lighter" OR "heavier".

Ok enough of php interview questions.
I need to pass a value to a function in .js file which has been linked in a
php file which in turn has been included in another php file.

--
//main.php
fetch DB values and store it in $param.
include"first.php"
--->

---
//first.php


--->

---
myjs.js
function fun(param)
{
... process with param
}
--->

How can I achieve this?

-murugesan

- Original Message -
> Binary search.  I'd say I have too much time on my hands, but I don't.
>
> 
> $eggs = array(1,1,1,1,1,2,1,1,1,1,1,1);
>
> $eggs1_6 = array_slice($eggs, 0, 6);
> $eggs7_12 = array_slice($eggs, 6, 6);
>
> if (array_sum($eggs1_6) > array_sum($eggs7_12))/// First time
> $half_eggs = $eggs1_6;
> else
> $half_eggs = $eggs7_12;
>
> $eggs1_3 = array_slice($half_eggs, 0, 3);
> $eggs4_6 = array_slice($half_eggs, 3, 3);
>
> if (array_sum($eggs1_3) > array_sum($eggs4_6))///Second time
> $quarter_eggs = $eggs1_3;
> else
> $quarter_eggs = $eggs4_6;
>
> if ($quarter_eggs[0] == $quarter_eggs[1])///Third time
> $egg = $quarter_eggs[2];
> else if ($quarter_eggs[0] > $quarter_eggs[1])
> $egg = $quarter_eggs[0];
> else
> $egg = $quarter_eggs[1];
>
> $index = array_search($egg, $eggs) + 1;
>
> print "Heavy egg is egg number {$index}\n";
>
> ?>
>
> murugesan wrote:
>
> > In a group of 12 eggs only one is having weight less or more.
> > Can we have a program to find the egg, provided we have to weigh only
three
> > times with a weighing machine with two pans,without using weights.

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



Re: [PHP] multiple db query

2003-09-02 Thread murugesan
I tried this and it is working well.

I use 2 DB namely db1 and db2

Mysql>use db1;
Mysql>select vv.visitorname,aa.visitorname  from  db1.visitordetails vv,
db2.visitordetails aa;

-Murugesan



- Original Message -
From: "Marek Kilimajer" <[EMAIL PROTECTED]>
To: "Aris Santillan" <[EMAIL PROTECTED]>
Cc: "Php (E-mail)" <[EMAIL PROTECTED]>
Sent: Tuesday, September 02, 2003 4:29 PM
Subject: Re: [PHP] multiple db query


> For MySQL Version 3.23.25 and above - yes, and it is (surprisingly)
> called MERGE. I'm not sure if tables can be merged across databases.
> More in the manual.
>
> Aris Santillan wrote:
>
> > is it possible to query on 2 databases
> > but with same tablename and merge its output?
> >
>
> --
> 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] register_globals

2003-09-02 Thread murugesan
Try restarting your apache.

-murugesan

- Original Message -
From: "Deependra b. Tandukar" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 03, 2003 10:09 AM
Subject: [PHP] register_globals


> Hi,
>
> I have configured PHP 4.3.3 in which register_gloabals is set to be off. I
> modified etc/php.ini and set it to be On but still it shows it is off and
> some developed applications in php are asking for it to be turned on. How
> do I do this?
>
> Regards,
> DT
>
> --
> 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] vars between instantiate class...

2003-09-03 Thread murugesan
Pass the value $this->_loginAttempts to the same page, assign it to
$this->_loginAttempts and then increment it.

-Murugesan

"jsWalter" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I am trying to see how many times a person has tried to log in during a
> session.
>
> the login script...
>
>$objAuth->start();
>
>if ($objAuth->getAuth())   // is user logged in already
>   ...display hello page...
>else
>   ...display login page
>
> OK, so far so good.
>
> If the user punches in anything wrong, the login gets displayed again.
>
> Now I want to track this iteration of attempts.
>
> In the START method, I did this...
>
> $this->_loginAttempts = $this->_loginAttempts + 1;
>
> then I added
>
> echo $objAuth->getLoginAttempts();
>
> before ...display login page... to see how it tracks.
>
> It always displays '1'
>
> To me, it looks like '$objAuth->start();' , which is called each time the
> page runs, which is each time a login attempt is made, is re-initializing
> all the class vars to their default state.
>
> If I make _loginAttempts = 8, then it displays 9.
>
> So, my question (this time) is how do I get the class to track this
counter?
>
> I hope I explained this well enough.
>
> I really don't think this is a PEAR::Auth specific question. I think it's
> just a "how do I keep this counter going in a class" question.
>
> Thanks
>
> Walter
>
> --
> 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] is there a php version with curl already integrated?

2003-09-04 Thread murugesan
Refer
http://in2.php.net/curl

-murugesan
- Original Message - 
From: "Chris" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 04, 2003 5:02 PM
Subject: [PHP] is there a php version with curl already integrated?


> hello,
> 
> i must admit, i'm quite a nub when it comes to compiling php myself, so 
> i'm wondering if there is any version of php with curl already bein part 
> of it? i'm running xp with apache 1.3.
> 
> cheers,
> chris
> 
> -- 
> 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] Persistent database connections in PHP

2003-09-04 Thread murugesan
Just use the same header.
and in the next page use

...

Murugesan

- Original Message - 
From: "Cesar Aracena" <[EMAIL PROTECTED]>
To: "'Shivanischal'" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, September 05, 2003 11:27 AM
Subject: RE: [PHP] Persistent database connections in PHP


> I haven't heard of persistent connections with MySQL before, and I think
> is because PHP can't handle it. PHP will connect to the DB every time it
> has to. Are you really that annoyed for that 0.0003 second that it
> probably takes your pages to connect to the DB?
> 
> What I do to manage just ONE connection request per visitor, is request
> a mainfile.php which also declares a function that connects to the DB.
> After that is prepared to handle all the queries you want.
> 
> HTH,
> 
> Cesar Aracena
> www.icaam.com.ar
> 
> > -Mensaje original-
> > De: Shivanischal [mailto:[EMAIL PROTECTED]
> > Enviado el: Viernes, 05 de Septiembre de 2003 01:05 a.m.
> > Para: [EMAIL PROTECTED]
> > Asunto: [PHP] Persistent database connections in PHP
> > 
> > Hi friends,
> > 
> > I wanted help on how to achieve persistent database connections in
> PHP.
> > The
> > database i use is MySQL. I would be grateful if u could also guide me
> to
> > resources that tell me how to do it.
> > 
> > Thanks,
> > -shiva
> > 
> > --
> > 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] Remove vars from memory?

2003-09-05 Thread murugesan
You must use unset()

-Murugesan

- Original Message -
From: "Robert Cummings" <[EMAIL PROTECTED]>
To: "Scott Fletcher" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, September 05, 2003 10:25 PM
Subject: Re: [PHP] Using rand() for 10 digit numbers


> It probably wraps the standard C rand() function which only takes an
> unsigned integer which is usually 16 bits.
>
> Cheers,
> Rob.
>
> On Fri, 2003-09-05 at 12:34, Scott Fletcher wrote:
> > Hi!
> >
> > I looked at the rand() at php.net which spoke about min and max
random
> > number.  So, I use rand(0,99) to get a 10 digit random number
but it
> > only return an 1 digit random number that is displayed at '0'.  So, I
tried
> > rand(0,) with 4 digit random number and got the random number.  So,
why
> > does it not work with 10 digit numbers?
> >
> > Scott F.
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> --
> .-.
> | Worlds of Carnage - http://www.wocmud.org   |
> :-:
> | Come visit a world of myth and legend where |
> | fantastical creatures come to life and the  |
> | stuff of nightmares grasp for your soul.|
> `-'
>
> --
> 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] Passing query parameter which has value "###"

2003-09-08 Thread murugesan
I passed value
main.php?name=$name&id=$id&id1=$id1  to next page
where $id has value "###"
In the next page I was not able to get the $id and $id1 values 
and I am able to get the two values $id1 and $name when I used
main.php?name=$name&id1=$id1
What might be the problem?

-Thanks & regards,
Murugesan

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



Re: [PHP] Problem Coding a Tutorial

2003-09-08 Thread murugesan
This may help you.

//createenrty.php

Re: [PHP] Passing query parameter which has value "###"

2003-09-08 Thread murugesan
Not at all. I tried it.
When I see the properties of that page it is showing me
http://172.16.1.193/main.php?name=murugesh&id=#&[EMAIL PROTECTED]

but the actual value for id is ###

-Murugesan

- Original Message -
From: "Angelo Zanetti" <[EMAIL PROTECTED]>
To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>; "murugesan"
<[EMAIL PROTECTED]>
Sent: Monday, September 08, 2003 5:06 PM
Subject: RE: [PHP] Passing query parameter which has value "###"


> try this
>
>
> main.php?name=" . $name . "&id=" . $id . "&id1=" . $id1 . "
>
>
> HTH
> -Original Message-
> From: murugesan [mailto:[EMAIL PROTECTED]
> Sent: Monday, September 08, 2003 1:05 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Passing query parameter which has value "###"
>
>
> I passed value
> main.php?name=$name&id=$id&id1=$id1  to next page
> where $id has value "###"
> In the next page I was not able to get the $id and $id1 values
> and I am able to get the two values $id1 and $name when I used
> main.php?name=$name&id1=$id1
> What might be the problem?
>
> -Thanks & regards,
> Murugesan
>
> --
> 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] Passing query parameter which has value "###"

2003-09-08 Thread murugesan
Thanks for the reply.It is working

-Murugesan
- Original Message -
From: "Chris Hayes" <[EMAIL PROTECTED]>
To: "murugesan" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, September 08, 2003 5:15 PM
Subject: Re: [PHP] Passing query parameter which has value "###"


> At 13:04 8-9-03, you wrote:
> >I passed value
> >main.php?name=$name&id=$id&id1=$id1  to next page
> >where $id has value "###"
> >In the next page I was not able to get the $id and $id1 values
> >and I am able to get the two values $id1 and $name when I used
> >main.php?name=$name&id1=$id1
> >What might be the problem?
>
>
> The # in a url is used for the in-page anchors, e.g. if you have an anchor
> in your page , then a url such as
page.html#chapter2
> will jump to that location in the page. So the part after the # is cut off
> by the browser, i suppose.
>
>
> Try this:
>  echo '';
> ?>
> This changes the # to a code (% followed by some number)
>
> (check urlencode in the manual)
>

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



Re: [PHP] Escaping the " ' " character

2003-09-10 Thread murugesan



Try this
 
$url="";echo "asd";?>
 HTH
-Murugesan

  - Original Message - 
  From: 
  Todd 
  Cary 
  To: [EMAIL PROTECTED] 
  Sent: Wednesday, September 10, 2003 10:57 
  PM
  Subject: [PHP] Escaping the " ' " 
  character
  I need to print the 
  following:http://www.gilardi.com/pdf/gwyt1poc.pdf">http://www.gilardi.com/pdf/gwyt1poc.pdf','','')"and 
  I am not sure how to escape the " ' " characters.Actually, the 'http://www.gilardi.com/pdf/gwyt1poc.pdf' 
  will be a variable, $url.Can someone point me toward some docs on 
  this?Many thanks!Todd
  -- 


Re: [PHP] Shell question.

2003-09-10 Thread murugesan
use ; at the end of print

$sysnew = `echo $system | awk -F. '{ print; $1 }'` ;

-Murugesan

- Original Message -
From: "Sethi, Samir (IDS DM&DS)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 11, 2003 12:31 AM
Subject: [PHP] Shell question.


> Anyone had a chance to look at this. Been trying different combinations,
doesn't appear
> To work.
> Thanks.
>
> -Original Message-
> From: Sethi, Samir (IDS DM&DS) [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 10, 2003 1:07 PM
> To: '[EMAIL PROTECTED]'
> Subject: [PHP] Shell question.
>
>
>
> Another shell question -
>
> $system is set to eq-cca-u1.etsd.ml.com ,
> Running the commands below should give sysnew as eq-cca-u1 , stripping out
the etsd.ml.com.
>
> $sysnew = `echo $system | awk -F. '{ print $1 }'` ;
> echo "sysnew = $sysnew " ;
>
> However the echo statement returns sysnew as eq-cca-u1.etsd.ml.com, it
should be eq-cca-u1 since
> The awk removes everything after the .
>
> What am I doing wrong here ? Any feedback appreciated. Thanks.
>
> Samir.
>
> --
> 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] Problem with HTML Text box and PHP variable.

2003-09-11 Thread murugesan
This will help you

";
?>

-Murugesan


- Original Message -
From: "Golawala, Moiz M (IndSys, GE Interlogix)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 11, 2003 10:35 PM
Subject: [PHP] Problem with HTML Text box and PHP variable.


I am having a problem with rendering PHP variables in an HTML text box. If
the value of  $myString is "Hello" the line below will render it correctly
echo "";

However if the value of $myString is "Hello 1" then the line above will
populate the text box with only "Hello" and it will loose the "1"

If I change the problem line to the following:

echo "".$myString."";

I don't have a problem. "Hello 1" will be rendered correctly. But then I
don't have a text box to edit the value. Please help.

Thanks
Moiz

--
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] Whois request record in database

2003-09-12 Thread murugesan
You have missed the braces. Close it properly.  The following code works
well


  
  
  ");
  $db_name='dbname';
  $db_user='username';
  $db_password='password';
  $table='tablename';
  // Connect to the database
  $db_conn = mysql_connect("localhost",$db_user,$db_password);
  if (!$db_conn)
  {
   die ("ERROR: Cannot connect to the database.");
   //exit();
  }
  $ip = $REMOTE_ADDR;
  $insert="select * from $table";
  $db_query=mysql_db_query($db_name,$insert);
  if($name)
  {
   if($dbquery)
   { print("Done.");
   }
   else
   { print("Didn't work.");
   }
  }
 }
?>

-Murugesan


- Original Message -
From: "IS" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 12, 2003 3:03 PM
Subject: [PHP] Whois request record in database


> I want to record the whios requests people do, not the whois output, in
> a MySQL database. Somebody helped me with the code here below, but I get
> a parse error when I test it.
>
> Parse error: parse error, unexpected $ in
> /home/moo/public_html/whois/index.php on line 32
>
> What can help me out?
>
> 
> if(!$name) {
> print("
> 
> 
> ");
>
> $db_name='databasename';
> $db_user='user';
> $db_password='password';
> $table='whoistracker';
>
> // Connect to the database
> $db_conn = mysql_connect("localhost",$db_user,$db_password);
> if (!$db_conn)
> {
> die ("ERROR: Cannot connect to the database.");
> //exit();
> }
>
> $ip = $REMOTE_ADDR;
> $insert="INSERT INTO $table (name,ipaddress) VALUES ('$name','$ip')";
> $db_query=mysql_db_query($db_name,$insert);
>
> if($name) {
> if($dbquery) { print("Done."); } ELSE { print("Didn't work."); }
> ?>
>
> --IS
>
> --
> 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] chm file for tutorial

2004-10-25 Thread murugesan
Hello all,

 

I am new to PHP programming.. It will be nice to have a chm file
on php tutorial. Can anyone point me to that location ? Also I would like to
know how how to code the following line ?

 

Mail
 

 

Regards,

Dinesh_P_V



RE: [PHP] chm file for tutorial

2004-10-25 Thread murugesan
Thanks Marek... 

 

> Mail
 

> You just did.

 

and got the answer from the tutorial...

 

Regards,

Dinesh_P_V

 

-Original Message-
From: Marek Kilimajer [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 25, 2004 4:58 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] chm file for tutorial

 

[EMAIL PROTECTED] wrote:

> Hello all,

> 

>  

> 

> I am new to PHP programming.. It will be nice to have a chm
file

> on php tutorial. Can anyone point me to that location ?

 

http://www.php.net/download-docs.php

 

> Also I would like to

> know how how to code the following line ?

> 

>  

> 

> Mail

>  

 

You just did.



Re: [PHP] Cannot pass values from one page to another

2003-08-27 Thread Murugesan N
I think you don't get me.
I am not registering the password.
Just I use
$_SESSION['uname']=$uname;
and I need to get the value $_SESSION['visnme'] in the next new page
without passing the uname in the URL itself.(  
What I need is that I want to fetch the value of $unme in the next page
after login without passing it to next page.
Ofcourse the solution is to use POST.
I used POST to pass it to next page.
That page is authentication.php
where I check the uname and passwd and invoked header('...php?$visnme)
function
From this page how can I pass $uname without using query parameters.
Thanks for the reply
-murugesan
- Original Message -
From: <[EMAIL PROTECTED]>
To: "php mailing list" <[EMAIL PROTECTED]>
Sent: Wednesday, August 27, 2003 11:24 AM
Subject: Re: [PHP] Cannot pass values from one page to another

Hi,

Ok this is a major vulnerability that you are coding. Register globals
on and password being stored in the session is like having a banner on
your home page saying 'come and hack me'.
murugesan wrote:

>My register_globals in set to ON in php.ini file.
>I cannot use HTTP_COOKIE_VARS because I need to pass the password from
one
>page to another.
>
>-murugesan
>- Original Message -
>From: <[EMAIL PROTECTED]>
>To: "php mailing list" <[EMAIL PROTECTED]>
>Sent: Tuesday, August 26, 2003 7:13 PM
>Subject: Re: [PHP] Cannot pass values from one page to another
>
>
>
>
>>what's your register globals settings?
>>did you try to retrieve from HTTP_COOKIE_VARS ?
>>
>>
>>murugesan wrote:
>>
>>
>>
>>>Thanks for the message.
>>>I looked into the manual.
>>>But it is not working.
>>>Ofcourse I used session_start in every pages.
>>>
>>>-murugesan
>>>
>>>- Original Message -
>>>From: "Jay Blanchard" <[EMAIL PROTECTED]>
>>>To: "murugesan" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
>>>Sent: Tuesday, August 26, 2003 5:23 PM
>>>Subject: RE: [PHP] Cannot pass values from one page to another
>>>
>>>
>>>[snip]
>>>I got this value in next page(main.php)
>>>But from there I am not able to pass it to next page
>>>I used
>>>session_register('uid');
>>>in main.php
>>>but in next page $uid is returning null
>>>[/snip]
>>>
>>>First, look at the manual for sessions. You have posted many questions
>>>where the manual would have provided you a solution.
>>>
>>>Are you placing session_start() at the top of each page where you
expect
>>>session variables to be available? You should be...
>>>
>>>Have a pleasant day.
>>>
>>>
>>>
>>>
>>>
>>--
>>http://www.raditha.com/php/progress.php
>>A progress bar for PHP file uploads.
_
Design your own holidays. Make memories that last a lifetime. 
http://www.flexihols.com/2003/index.php Enjoy!

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


Re: [PHP] Posting values of dynamically generated text fields at a time

2010-07-13 Thread Saravanan Murugesan
> Hi is anybody there to help me out on this?
>
>>
>> Hi all,
>> I am new to PHP and JS.
>>
>> I am adding new text fields using javascript and I have to save the
>> values
>> of these fields in database in single row. So, how should I post these
>> values? So that I can save them in the db.
>>
>> Additional Info: There are 6 text fields in the row. I have to post the
>> information of all the fields collectively.
>>
>> So, please suggest me a way.
>> --
>> Thanks and Regards,
>> Amit
>>
>>
>
>
> --
> Thanks and Regards,
> Amit
> eArth Solutions Pvt. Ltd
>

Hi,

this would help you,
http://www.w3schools.com/PHP/php_mysql_insert.asp

Thanks,
Saravana


===
***Disclaimer***


This email, and any attachments ("this email"), is confidential. If you are not 
the addressee
please tell the sender immediately, and destroy this email without using, 
sending or storing
it. Any opinions, express or implied, in this email, are those of the sender, 
and are not
necessarily approved by Hurix Systems. Except as expressly stated, this e-mail 
should not be
regarded as an offer, solicitation, recommendation or agreement to buy or sell 
products or
services, or to enter into any contract. E-mail transmissions are not secure 
and may suffer
errors, viruses, delay, interception and amendment. Hurix Systems does not 
accept liability
for damage caused by any of the foregoing.

HURIX SYSTEMS MAY MONITOR ALL INCOMING AND OUTGOING MAILS


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



Re: [PHP] Posting values of dynamically generated text fields at a time

2010-07-14 Thread Saravanan Murugesan


Regards,

Saravanan Murugesan
Sr. Media Developer


Hurix Systems Pvt. Ltd
New No.34 / Old No.10, Taylors Road, Kilpauk, Chennai 600010. INDIA
Phone: +91-044-42284888 ext.852
Mobile: +91-9940295951

- Original Message - 
From: "Ashley Sheridan" 

To: 
Cc: "Amit Bobade" ; 
Sent: Wednesday, July 14, 2010 2:00 PM
Subject: Re: [PHP] Posting values of dynamically generated text fields at a 
time




On Wed, 2010-07-14 at 12:08 +0530, Saravanan Murugesan wrote:


> Hi is anybody there to help me out on this?
>
>>
>> Hi all,
>> I am new to PHP and JS.
>>
>> I am adding new text fields using javascript and I have to save the
>> values
>> of these fields in database in single row. So, how should I post these
>> values? So that I can save them in the db.
>>
>> Additional Info: There are 6 text fields in the row. I have to post 
>> the

>> information of all the fields collectively.
>>
>> So, please suggest me a way.
>> --
>> Thanks and Regards,
>> Amit
>>
>>
>
>
> --
> Thanks and Regards,
> Amit
> eArth Solutions Pvt. Ltd
>

Hi,

this would help you,
http://www.w3schools.com/PHP/php_mysql_insert.asp

Thanks,
Saravana


===
***Disclaimer***


This email, and any attachments ("this email"), is confidential. If you 
are not the addressee
please tell the sender immediately, and destroy this email without using, 
sending or storing
it. Any opinions, express or implied, in this email, are those of the 
sender, and are not
necessarily approved by Hurix Systems. Except as expressly stated, this 
e-mail should not be
regarded as an offer, solicitation, recommendation or agreement to buy or 
sell products or
services, or to enter into any contract. E-mail transmissions are not 
secure and may suffer
errors, viruses, delay, interception and amendment. Hurix Systems does 
not accept liability

for damage caused by any of the foregoing.

HURIX SYSTEMS MAY MONITOR ALL INCOMING AND OUTGOING MAILS





Erm, that's not even remotely an answer to the OPs question...

Thanks,
Ash
http://www.ashleysheridan.co.uk




Hi Amit,

I couldn't able understand exactly what your requirement is. I have attached 
a php page, just see whether this helps...


This one generates text fields dynamically in a page and then onSubmit it 
takes the values to DB process...


Thanks,
saravana 



===
***Disclaimer***


This email, and any attachments ("this email"), is confidential. If you are not 
the addressee
please tell the sender immediately, and destroy this email without using, 
sending or storing
it. Any opinions, express or implied, in this email, are those of the sender, 
and are not
necessarily approved by Hurix Systems. Except as expressly stated, this e-mail 
should not be
regarded as an offer, solicitation, recommendation or agreement to buy or sell 
products or
services, or to enter into any contract. E-mail transmissions are not secure 
and may suffer
errors, viruses, delay, interception and amendment. Hurix Systems does not 
accept liability
for damage caused by any of the foregoing.

HURIX SYSTEMS MAY MONITOR ALL INCOMING AND OUTGOING MAILS


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