Re: [PHP-WIN] i need help

2004-05-18 Thread Peter 'iridium' Waller
Jordi Canals wrote: Student wrote: I want to trim the following text [i:abcdef] Hi, You can do: $data = '[i:something]'; $array_data = explode(':',$data); and you will have: '[i' in $array_data[0] 'something]' in $array_data[1] If i understod corretly, you want to get only something, so you need $

Re: [PHP-WIN] i need help

2004-05-18 Thread Cory D. Wiles
Assuming you are doing just one string at a time: $regex = "/(\[i:)(\w+)(\])/i"; preg_match($regex, $str, $matches); print $str;//original string print substr($matches[2], 1, 3);//trimmed string ?> Gryffyn, Trevor wrote: If the format is consistantly the same, try this: $somedata = "[i:aslkdfj]";

RE: [PHP-WIN] i need help

2004-05-18 Thread Gryffyn, Trevor
If the format is consistantly the same, try this: $somedata = "[i:aslkdfj]"; $insidedata = substr($somedata,3,strlen($somedata)-4); -TG > -Original Message- > From: Student [mailto:[EMAIL PROTECTED] > Sent: Monday, May 17, 2004 11:42 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subje

Re: [PHP-WIN] i need help

2004-05-18 Thread Jordi Canals
Student wrote: I want to trim the following text [i:abcdef] but the inside text is different at time eg abcdef, bcdefg, etc etc how can i trim [i:(some text here)] so that i can replace them with nothing. eg these are to be trimmed. [i:abcdef] [i:bcdefg] [i:xyzab] [i:priftds] how can i trim them..

Re: [PHP-WIN] i need help

2003-11-27 Thread Hasan Barýþ Karayel
thanks... it works... From: Donatas <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: Re: [PHP-WIN] i need help Date: Thu, 27 Nov 2003 18:28:26 +0200 It doesn't work coz you need to do it this way: echo("Your username = ". *$_GET ['username']*.""); e

RE: [PHP-WIN] i need help

2003-11-27 Thread Disko_kex
Try use $HTTP_GET_VARS["password"] or $_GET["password"] > -Original Message- > From: Hasan Barýþ Karayel [mailto:[EMAIL PROTECTED] > Sent: den 27 november 2003 17:26 > To: [EMAIL PROTECTED] > Subject: [PHP-WIN] i need help > > Hi > i am new in PHP... > i made very a simple code but it d

RE: [PHP-WIN] i need help

2003-11-27 Thread Mike Brum
Do you have register_globals on? If not, try this: Your username = " . $HTTP_GET_VARS['username'] . ""; echo "Your password = " . $HTTP_GET_VARS['password'] . ""; ?> Regards Mike -Original Message- From: Hasan Barýþ Karayel [mailto:[EMAIL PROTECTED] Sent: Thursday, November 27, 2003 1

Re: [PHP-WIN] i need help

2003-11-27 Thread Donatas
Disregard those stars... I guess this is a bug in my mail app or php-win mailing list, it should have been bold instead. Donatas wrote: It doesn't work coz you need to do it this way: echo("Your username = ". *$_GET ['username']*.""); echo("Your password = ". *$_GET ['password']*.""); you use $_

Re: [PHP-WIN] i need help

2003-11-27 Thread Donatas
It doesn't work coz you need to do it this way: echo("Your username = ". *$_GET ['username']*.""); echo("Your password = ". *$_GET ['password']*.""); you use $_GET ['']; superglobal array for values passed via link or form where type is get or $_POST ['']; if you get info from a form via post met

Re: [PHP-WIN] i need help with an undefined variable

2002-10-02 Thread Anyang
thanks for the help. got it to work "Brother - Martin Bagge" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Anyang: > > > it's giving me this now: > > Notice: Undefined index: game in C:\Xitami\webpages\index.php on line > > 5 Notice: Undefined index: game in

Re: [PHP-WIN] i need help with an undefined variable

2002-10-02 Thread Luis Ferro
>> >>>>if (!$_GET["game"]) { >>>>include("public.html"); >>>>} >>>>if ($_GET["game"] != NULL && $op != NULL) { >>>>include("http://mywebsite.com/example/"; . "$game" . ".

RE: [PHP-WIN] i need help with an undefined variable

2002-10-02 Thread brother - Martin Bagge
Anyang: > it's giving me this now: > Notice: Undefined index: game in C:\Xitami\webpages\index.php on line > 5 Notice: Undefined index: game in C:\Xitami\webpages\index.php on > line 8 > > because i'm opening index.php without using ?game= > is there anything I can do to not get it to say that?

Re: [PHP-WIN] i need help with an undefined variable

2002-10-02 Thread Anyang
) { > > > > include("http://mywebsite.com/example/"; . "$game" . ".html"); > > > > } > > or post instead of get in there? > > > -Original Message- > > From: Anyang [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, 2 Oct

Re: [PHP-WIN] i need help with an undefined variable

2002-10-02 Thread Anyang
gt; > include("public.html"); > > > > } > > > > if ($_GET["game"] != NULL && $op != NULL) { > > > > include("http://mywebsite.com/example/"; . "$game" . ".html"); > > > > } >

RE: [PHP-WIN] i need help with an undefined variable

2002-10-01 Thread Peter Houchin
if ($_GET["game"] != NULL && $op != NULL) { > > > include("http://mywebsite.com/example/"; . "$game" . ".html"); > > > } or post instead of get in there? > -Original Message- > From: Anyang [mailto:[EMAIL PROTECTED]] &g

RE: [PHP-WIN] i need help with an undefined variable

2002-10-01 Thread Peter Houchin
how r u getting $game? that's the undefind var. > -Original Message- > From: Anyang [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, 2 October 2002 11:38 AM > To: [EMAIL PROTECTED] > Subject: [PHP-WIN] i need help with an undefined variable > > > I wrote a php script for a page that I hosted

Re: [PHP-WIN] i need help with an undefined variable

2002-10-01 Thread Anyang
Like i said, the other server understood it at a function of the address bar so if index.php?game=foobar then $game = foobar and it would refresh the page with the foobar page in the center. This is what I want to do. "Peter Houchin" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[

Re: [PHP-WIN] I need help!!!

2001-05-21 Thread Mike Flynn
Read one line from the text file at a time. Then use explode to separate it by semicolons. Haven't ever done it from a text file myself, but something SIMILAR to this should work: \n"; print "$str1\n"; print "$int1\n"; print "$str2\n"; print " \n"; } ?> At 03:45 PM

Re: [PHP-WIN] I need help!!!

2001-05-21 Thread Michel Laine
Alain Menard wrote: > I clicked on the send button to fast... > > The part that i'm having problem with is the second part. Especially the one > about the first string becomming a link to the corresponding URL. > > ""Alain Menard"" <[EMAIL PROTECTED]> wrote in message > 9dv3k5$873$[EMAIL PROTECTE

Re: [PHP-WIN] I need help!!!

2001-05-17 Thread Michael Kelley
They way I handled something like this was, I read the line in with fread breaking it up into "$chunks" $chunk1 = fread( $fp, 12); //Your string#1 $chunk2 = fread( $fp, 11); //The URL $chunk3 = fread( $fp, 5); //the INT $chunk4 = fread( $fp, 50); //The final Stri

Re: [PHP-WIN] I need help!!!

2001-05-16 Thread Alain Menard
I clicked on the send button to fast... The part that i'm having problem with is the second part. Especially the one about the first string becomming a link to the corresponding URL. ""Alain Menard"" <[EMAIL PROTECTED]> wrote in message 9dv3k5$873$[EMAIL PROTECTED]">news:9dv3k5$873$[EMAIL PROTE