Re: [PHP] Authentification related to browser window
See from my point of view, You made one file as first.php as alogin page and then in second.php check that the user is authorised or not. and set the value as $_session['user'] And one more file as check.php in which you check that session is set or not. like (isset($_SESSION['user]) if it not true then redirect the page to first.php as header("firs.php"). And now add this check.php in all the page as a include file at the starting of your page. So it will check the session first of all then it will go to next page. Thnx.. Ankur Dave PHP Developer,INDIA Quoting Cristi Barladeanu <[EMAIL PROTECTED]>: > Greetings > > My problem is pretty simple. User enters the site, logins, and after > that he hits ctrl+n or something, to open a new window from same > browser. Can I make him to login again in the new window but to keep > him logged in the old one? > > Now i'm using sessions, but i realise that the cookies set by them are > related to browser, so every window use them. > > I hope you will understand what i mean. > > Cheers, > Cristi > > -- > 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] VOTE TODAY
Hi to all I am from Great INDIA for indian politics it is very much nacessary the US election... so which ever person is select but he sholud be very loyal to all Ankur Dave INDIA -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Pb'lm of Regular Expression
Hi to all My problem is that i want to create one regular expression which can fatch this image tag from my site "https://abc.com/first.php? site_id=abc&aid=keyin&lid=keyin&ref=&q=\" width=\"1\" height=\"1\">"; http://www.mysite.com";); function print_links($url) { $page_contents = file_get_contents("$url"); preg_match_all("/*/",$page_contents,$match_array); print ""; print_r($match_array); print ""; foreach ($match_array as $entry) { print("The image Tag is :"); } } ?> Now what regular expression i write so i can fetch the image tag from my site of above syntex.And if possible send me the regular expression of fetching Thnx in Advance. Ankur Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why cookie is created?
I just want to give you a simple example that for diff. of session and cookie is that--- When in our gmail account we will see that one option is there to save the password for 2 weeks, so that eans when u check that bbox and submit then one cookie is created for that comp. with your details nand the expiry time would be for 2 weeks (by converting insec.). And when u r in checking of your in box just copy the contents of address bar and then closs all the windo and again paste the address bar link it will sshow you the login page because your inforation is stored in seession.So when a page starts it first of al it check the session.it will check the session id from your co. which is not set when you logged out FOR SESSION == " A visitor accessing your web site is assigned an unique id, the so-called session id. The session support allows you to register arbitrary numbers of variables to be preserved across requests. When a visitor accesses your site, PHP will check automatically (if session.auto_start is set to 1) or on your request (explicitly through session_start() or implicitly through session_register()) whether a specific session id has been sent with the request. If this is the case, the prior saved environment is recreated. " FOR COOKIE == " Cookies are a mechanism for storing data in the remote browser and thus tracking or identifying return users. " Ankur Dave PHP Developer INDIA -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Pb'lm of Regular Expression
thnx for your support every thing is working well but still one problem, that height and width are not coming so how i modify the first regular exp. so it shows both height and width. //s Thnx... Ankur Dave Quoting Klaus Reimer <[EMAIL PROTECTED]>: > [EMAIL PROTECTED] wrote: > > "https://abc.com/first.php? > > site_id=abc&aid=keyin&lid=keyin&ref=&q=\" width=\"1\" height=\"1\">"; > > //s > > The complete tag is in index 0, the src is in index 1 of the match-array. > > > > Now what regular expression i write so i can fetch the image tag from my > site of > > above syntex.And if possible send me the regular expression of fetching > > > > /(.*?)<\/a>/s > > The complete tag is in index 0, the href attrib in index 1 and the link > text in index 2. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Dynamic Combo Box
Dear All, I want to create 3 dynamic combo box. When i select the first combo(select) box then automatically the related details [from database] will come in the second select box.and simultenously for second to third. Please help me.(give me some help through code) I have to complete the project at last by today... Thnx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Permissions
Sorry, I do not know the exect anaswer but i have one rough idea that in PHP we have one function by which we can run the linux command like fun_name("") Actually i used this function long before so i forgot we can use chmod 777 to our file or any command to change the permissionand by this we can solve tis problem (may Be) Ankur Quoting Jay Blanchard <[EMAIL PROTECTED]>: > [snip] > I have a need for a PHP application to read/write Linux system files > that > have root.root ownership. At present reading not a problem but writing > obviously is denied. I know there are probably some serious security > issues > here, but what should I be doing to allow this behaviour. I am running > PHP > 4.3.8 on Linux Redhat Fedora 1 installed as an Apache module. > [/snip] > > either change the file permissions, making it something other than root > or chmod the file 766 so that all have read and write access to it. PHP > is running under whatever persmissions Apache is running (if that is how > you have it installed). > > -- > 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] $_POST['xxx'] = "blabla" ?
Dear u r correct, Both r same... but in first case ur variable with a constant string value And in second case u r checking that your variable is set or not but one limitation with the function is that.. "isset() only works with variables as passing anything else will result in a parse error." But second cace is more effective and it takes less time when u go 4 large comparisions Thnx... Ankur PHP Developer INDIA Quoting Perry Jönsson <[EMAIL PROTECTED]>: > Hello, > > What is the difference between these two examples? > Both works fine for me. > > > > 1. if ($_POST['submit'] == 'Login') { > ... > ... > } > > 2. if (isset($_POST['submit']) { > ... > ... > } > > -- > 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] Regular Expression
Hi, This is quite simpal problem that i want to made regular expression which can read this kind of structure... a,b,c not like this 1. ,a,a,a 2. a,,,aa,, 3. a,a,a,,, means simpal structure with comma (a,b,c...) Thnx Ankur -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Text Parser
Suppose this is your first string $value house , ball , door , roof , floor $saparate = explode(",",$value); $list = implode("','", $arr1); $final = ('$arr2'); echo $final; Thnx... Quoting Pablo D Marotta <[EMAIL PROTECTED]>: > Hi there.. > A newbie issue: > I´m receiving this: "house , ball , door , roof , floor" > And I want to obtain this: "'house','ball','door','roof','floor'" > > Maybe, I should use implode or explode, but I just can´t figure out how.. > Help? > > > > American Express made the following > annotations on 12/02/04 08:13:28 > -- > ** > > "This message and any attachments are solely for the intended recipient > and may contain confidential or privileged information. If you are not the > intended recipient, any disclosure, copying, use, or distribution of the > information included in this message and any attachments is prohibited. If > you have received this communication in error, please notify us by reply > e-mail and immediately and permanently delete this message and any > attachments. Thank you." > > ** > > == > > -- > 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] help plssssss.!!!
I think u have to go for http://www.w3schools.com Thnx for joining the group Ankur Dave Quoting "Tomar Rajeev (ext)" <[EMAIL PROTECTED]>: > > Hello All, > > I am a new member of this group and in the world of PHP;-) > > In my company, around 12 web pages are there. So, I want to make a web > portal in PHP from where all these web pages can be accessed. > > Also, I want to provide the link for the web pages ( will make three > categories) in three horizontal dynamic menu. > > If some user clicks on the link then the corresponding web page should be > shown in the same web page just below the dynamic menu. > > It will be great if you could help me in finding the source code of this > type of web page in PHP. > > Thanking in Anticipation. > > Regards, > > Rajeev Tomar > > -- > 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