Re: [PHP] phpsadness

2011-05-28 Thread TR Shaw
Well the argument has both sides. Division by zero on many platforms resulted in zero. Then came IBM360 and it generated an exception causing big time issues in legacy code so a OS patch was written to intercept the interrupt, jam the result to zero and return. Although mathematically undefined

Re: [PHP] What's up with Quercus?

2011-05-28 Thread Nathan Nobbe
On Fri, May 27, 2011 at 11:52 PM, Arnold Hesnod wrote: > Although I've been mostly using Java and Ruby in my professional software > development work for the past decade or so, in the past two or three years > I've started to do more and more PHP. I originally started using PHP > because I neede

Re: [PHP] phpsadness

2011-05-28 Thread Nathan Nobbe
On Sat, May 28, 2011 at 1:34 PM, Andre Polykanine wrote: > Hello Nathan, > > Do you mean $x{8}? > yup, that or $x[8]; > That is good but not for all situations. > I need sometimes to make an array with letters as keys and numbers as > values, like this (I give English alphabet just as an

Re: [PHP] phpsadness

2011-05-28 Thread Andre Polykanine
Hello Nathan, Do you mean $x{8}? That is good but not for all situations. I need sometimes to make an array with letters as keys and numbers as values, like this (I give English alphabet just as an example, so please don't suggest str_split): $alphabet="abcdefghijklmnopqrstuvwxyz"; // I wish

Re: [PHP] phpsadness

2011-05-28 Thread Andre Polykanine
Hello Peter, It's not unicode... :-(( Yepp, I saw this thing in notes with array_map, array_chunk and array_something_else but it's still too slow, on my opinion. -- With best regards from Ukraine, Andre Skype: Francophile My blog: http://oire.org/menelion (mostly in Russian) Twitter: htt

Re: [PHP] insert to table in php scripts

2011-05-28 Thread Negin Nickparsa
Thanks Viraj,I'll read it.

Re: Re: [PHP] how to use echo checkboxes in php when i don't have access to $_POST

2011-05-28 Thread Negin Nickparsa
Yes,you are right I visited the http://stackoverflow.com/users/218196/felix-kling and i found my problem and solved it

Re: [PHP] Detecting HTTPS connections under Apache

2011-05-28 Thread Igor Konforti
LOL :) Just saw phpinfo() and you are right, it shows port 80 even if it's httpS :0 But the problem is, that $_SERVER['SERVER_PORT'] is apache variable and not php, meaning that apache is telling PHP that it works on port 80. Even if you use .htaccess and variable "%{SERVER_PORT}" it will not work

Re: [PHP] Detecting HTTPS connections under Apache

2011-05-28 Thread Geoff Shang
On Fri, 27 May 2011, Curtis Maurand wrote: $_SERVER['HTTPS'] I don't see this at all. I'm definitely connecting securely. Here are the status lines from Lynx when surfing to https://MintFM.net/phpinfo.php: 1. Looking up mintfm.net 2. Making HTTPS connection to mintfm.net 3. Ve

Re: [PHP] phpsadness

2011-05-28 Thread Nathan Nobbe
On Sat, May 28, 2011 at 4:33 AM, Robert Cummings wrote: > On 11-05-28 05:26 AM, Andre Polykanine wrote: > >> Hello Lester, >> >> Actually, many of the points are not important for me so far, however >> this one really drives me mad: >> http://phpsadness.com/?page=sad/35 (can't explode() by

Re: [PHP] insert to table in php scripts

2011-05-28 Thread viraj
hi nigen, the intention of that 'exit' was to stop the script temporarily to avoid any second time inserts. i think you better figure-out what caused your script to insert same data twice in a single form post. to hide the form, 'exit' is not the best option. there are several different ways, one

Re: Re: [PHP] how to use echo checkboxes in php when i don't have access to $_POST

2011-05-28 Thread Tim Streater
On 28 May 2011 at 14:11, Igor Konforti wrote: > It means that array $_POST does not have a key called "negin". > Simple If statement before line 4 would fix this. > On Sat, May 28, 2011 at 16:03, Negin Nickparsa wrote: >> suppose that i have this SIMPLE code: >> > echo""; >> echo $_POST['negi

Re: [PHP] how to use echo checkboxes in php when i don't have access to $_POST

2011-05-28 Thread Igor Konforti
It means that array $_POST does not have a key called "negin". Simple If statement before line 4 would fix this. And I agree with @Jasper Mulder. Perhaps you should try stackoverflow.comfor this kind of questions Regards On Sat, May 28, 2011 at 16:03, Negin Nickparsa wrote: > I'm sorry tha

Re: [PHP] how to use echo checkboxes in php when i don't have access to $_POST

2011-05-28 Thread Negin Nickparsa
I'm sorry that I disturbed you and the List,I tried hard to mind my punctuations but my English has weaknesses you can understand from my posts,one time I apologized.. No my problem is not with these punctuations i know them I said for example,I mean in general suppose that i have this SIMPL

RE: [PHP] how to use echo checkboxes in php when i don't have access to $_POST

2011-05-28 Thread Jasper Mulder
> Date: Sat, 28 May 2011 16:39:13 +0430 > From: nickpa...@gmail.com > To: l...@mit-web.dk > CC: php-general@lists.php.net > Subject: Re: [PHP] how to use echo checkboxes in php when i don't have access > to $_POST > > because when the name is in echo it ca

Re: [PHP] insert to table in php scripts

2011-05-28 Thread Negin Nickparsa
in this topic problem WAS this one: insert to a table twice(that was solved) and on that post problem is this one: working with echo html then insert to a table (problem in $_POST) I thought it is very different am i wrong?

Re: [PHP] insert to table in php scripts

2011-05-28 Thread Negin Nickparsa
cause it's in another topic!!! and another problem! this problem was solved i had another problem what do you mean!?

Re: [PHP] how to use echo checkboxes in php when i don't have access to $_POST

2011-05-28 Thread Negin Nickparsa
because when the name is in echo it can't access to $_POST 4 example $_POST['p$i'] it tells me undefined variable p$i when in html we write it in form because it has post method it can set $_POST but here in php i just echo it and i can't access it maybe i am wrong but how can i correct it?

Re: [PHP] insert to table in php scripts

2011-05-28 Thread Igor Konforti
But why do you double-post your question? http://news.php.net/php.general/313198 ? On Sat, May 28, 2011 at 11:21, Negin Nickparsa wrote: > i'm wondering that what was the problem! > why with just a session it now works propely!!! > how! >

Re: [PHP] how to use echo checkboxes in php when i don't have access to $_POST

2011-05-28 Thread Lars Nielsen
lør, 28 05 2011 kl. 13:32 +0430, skrev Negin Nickparsa: > because I echo the checkboxes like this: > > if($num>0) > { > echo ""; > for($i=0;$i<$num;$i++) > { > $row=mysql_fetch_row($result); > echo ""; > echo""; > echo"$row[0]"; > echo""; > }//for > echo""; > }//if > > i can't use $_POST because

Re: [PHP] phpsadness

2011-05-28 Thread Robert Cummings
On 11-05-28 05:26 AM, Andre Polykanine wrote: Hello Lester, Actually, many of the points are not important for me so far, however this one really drives me mad: http://phpsadness.com/?page=sad/35 (can't explode() by an empty string) Besides that, he says nothing about unicode issues. I

Re: [PHP] phpsadness

2011-05-28 Thread Peter Lind
On May 28, 2011 11:27 AM, "Andre Polykanine" wrote: > > Hello Lester, > > Actually, many of the points are not important for me so far, however > this one really drives me mad: > http://phpsadness.com/?page=sad/35 (can't explode() by an empty > string) http://www.php.net/manual/en/functio

Re: [PHP] phpsadness

2011-05-28 Thread Andre Polykanine
Hello Lester, Actually, many of the points are not important for me so far, however this one really drives me mad: http://phpsadness.com/?page=sad/35 (can't explode() by an empty string) Besides that, he says nothing about unicode issues. I love PHP (I really do, it's a neat language,

[PHP] Re: how to use echo checkboxes in php when i don't have access to $_POST

2011-05-28 Thread Negin Nickparsa
i mean my tables in Mysql

[PHP] how to use echo checkboxes in php when i don't have access to $_POST

2011-05-28 Thread Negin Nickparsa
because I echo the checkboxes like this: if($num>0) { echo ""; for($i=0;$i<$num;$i++) { $row=mysql_fetch_row($result); echo ""; echo""; echo"$row[0]"; echo""; }//for echo""; }//if i can't use $_POST because it's not in html how can i insert my items that are checked into table?

Re: [PHP] insert to table in php scripts

2011-05-28 Thread Negin Nickparsa
i'm wondering that what was the problem! why with just a session it now works propely!!! how!

Re: [PHP] insert to table in php scripts

2011-05-28 Thread Lester Caine
Negin Nickparsa wrote: I click the submit button just one time! not twice but when i go to MySql and select * from it it shows me happening two times The code looks OK, so something is hitting it twice. I normally have a unique index on anything that I do not want duplicates in - which would the

Re: [PHP] insert to table in php scripts

2011-05-28 Thread Negin Nickparsa
i used your exit too,yes it's better to hide the form after registration:)

Re: [PHP] insert to table in php scripts

2011-05-28 Thread Negin Nickparsa
Yes viraj it was in both tables

Re: [PHP] insert to table in php scripts

2011-05-28 Thread Negin Nickparsa
Hi viraj intresting! i changed the code to this: $kind=$_SESSION['s3']; $query1="insert into user(kind,user,pass,name)values('$kind','$str','$str2','$str3')"; $result1=mysql_query($query1); i set the session in my another page and now it works properly:D LOL!!

Re: [PHP] insert to table in php scripts

2011-05-28 Thread viraj
hi negin, do you get duplicate inserts into both tables? if yes, try an 'exit();' right after the success message; echo "you have been registered successfully!"; exit(); this will stop the script after the message, and you wont see the form either. at this point check the tables for duplicate rec

Re: [PHP] insert to table in php scripts

2011-05-28 Thread Negin Nickparsa
I click the submit button just one time! not twice but when i go to MySql and select * from it it shows me happening two times

Re: [PHP] insert to table in php scripts

2011-05-28 Thread Negin Nickparsa
Consistently here is the code: Registration Complete the form below: Name: Last name: Username: Password:

Re: [PHP] insert to table in php scripts

2011-05-28 Thread Lester Caine
Negin Nickparsa wrote: I have a code that i get the $_POST's result and then insert them in tables of Mysql it can run without error but it'll insert in the table twice and i don't know why. when I click the submit then with array_key_exists I go to if statement and insert it. i'll show the code

Re: [PHP] phpsadness

2011-05-28 Thread Lester Caine
Daevid Vincent wrote: A friend sent me this URL today. While amusing, he's got many valid points and I certainly share in his frustration. http://www.phpsadness.com I'd take him a bit more seriously if he used a real name ;) But many of the points I looked at simply reflect that he has yet to

[PHP] insert to table in php scripts

2011-05-28 Thread Negin Nickparsa
I have a code that i get the $_POST's result and then insert them in tables of Mysql it can run without error but it'll insert in the table twice and i don't know why. when I click the submit then with array_key_exists I go to if statement and insert it. i'll show the code if someone have time help

Re: [PHP] Urgent help - Token Generation code!

2011-05-28 Thread Shreyas Agasthya
Let me try and get back. Thanks, Jasper! On 28-May-2011, at 4:29 AM, Jasper Mulder wrote: From: shreya...@gmail.com To: lord_fa...@hotmail.com Subject: Re: [PHP] Urgent help - Token Generation code! Date: Sat, 28 May 2011 04:15:59 +0530 Jasper,