Re: Fwd: [PHP] newbie: problem with $_Post[]

2009-07-27 Thread A.a.k
Hello Richard, that is exactly what I was looking for. thanks alot Paul, I didn't know its possible to use error_reporting(), that's a good hint thanks. btw if you guys know any simple php application that I can study and learn faster than going through books please let me know. I tried Wordpres

Re: [PHP] Single Quotes in Form Inputs

2009-07-27 Thread Ben Dunlap
You can use http://us.php.net/mysql_real_escape_string to escape the input. [8<] You should prep your data for insertion into the data by using a tool that formats it strictly for the database. In the ops case mysql_real_escape_string() is the correct tool for the job. What about using prepa

Re: Fwd: [PHP] newbie: problem with $_Post[]

2009-07-27 Thread Paul M Foster
On Mon, Jul 27, 2009 at 09:01:16PM -0700, Richard S. Crawford wrote: > >> > >> username : > >> password : > >> > >> > >> > >> >> $user=$_POST['user']; > >> $pass=$_POST['pass']; > >> if(($user=="myname")&&($pass="mypass")) > >> echo "access granted"; > >> else > >> echo "access denied"; > >

Fwd: [PHP] newbie: problem with $_Post[]

2009-07-27 Thread Richard S. Crawford
>> >> username : >> password : >> >> >> >> > $user=$_POST['user']; >> $pass=$_POST['pass']; >> if(($user=="myname")&&($pass="mypass")) >> echo "access granted"; >> else >> echo "access denied"; >> ?> >> >> getting "Notice: Undefined index: user" and "Notice: Undefined index: pass". >> changin

Re: [PHP] newbie: problem with $_Post[]

2009-07-27 Thread Bastien Koert
On Mon, Jul 27, 2009 at 10:31 PM, A.a.k wrote: > Hello > I have a very simple test form named "pass.php"  : > > > username : > password : > > > > $user=$_POST['user']; > $pass=$_POST['pass']; > if(($user=="myname")&&($pass="mypass")) > echo "access granted"; > else > echo "access denied"; >

[PHP] newbie: problem with $_Post[]

2009-07-27 Thread A.a.k
Hello I have a very simple test form named "pass.php" : username : password : getting "Notice: Undefined index: user" and "Notice: Undefined index: pass". changing form action to another page will solve the problem but i want to be able to use $_POST array on the same page, how can i d

Re: [PHP] More on "JS alert that links to file"

2009-07-27 Thread tony mount
Thanks very much to all the he's and any she's who answered this. Tony -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Single Quotes in Form Inputs

2009-07-27 Thread Bob McConnell
From: Yuri Yarlei > I think mysql_real_escape_string() is work well, but if > you are use mysql db, if you are using another db, the best > function is addslashes but for another special charactes > you will need treat them with another ways Slashes are the wrong character to use. The official S

RE: [PHP] Single Quotes in Form Inputs

2009-07-27 Thread Yuri Yarlei
I think mysql_real_escape_string() is work well, but if you are use mysql db, if you are using another db, the best function is addslashes but for another special charactes you will need treat them with another ways Yuri Yarlei. Programmer PHP, CSS, Java, PostregreSQL; Today PHP, tomorrow Java

Re: [PHP] How to pull window to the foreground - Window Focus

2009-07-27 Thread WebPat
Richard Heyes wrote: Hi, A lot of sites are moving to simulated dialog windows inside the page. There's an updated version of my ModalDialog included in RGraph which does just this: http://www.rgraph.net/docs/external.html It covers the page in a semi transparent DIV to bring attention to i

Re: [PHP] open source forum

2009-07-27 Thread mrfroasty
Sorry if I wasnt clear enough, but I was looking for forum or may be the way you called it message board for people to discuss topics. Mostly its going to be a political Forum where people discuss major political topics/news about their country. So basically my search ended up with SMF as a softwa

Re: [PHP] Single Quotes in Form Inputs

2009-07-27 Thread Jim Lucas
Michael A. Peters wrote: > Bastien Koert wrote: >> On Mon, Jul 27, 2009 at 12:41 PM, Mari Masuda >> wrote: >>> You need to sanitize and escape the input before inserting it into >>> the db. >>> You can use http://us.php.net/mysql_real_escape_string to escape the >>> input. >>> >>> On Jul 27, 2009,

Re: [PHP] Single Quotes in Form Inputs

2009-07-27 Thread Michael A. Peters
Bastien Koert wrote: On Mon, Jul 27, 2009 at 12:41 PM, Mari Masuda wrote: You need to sanitize and escape the input before inserting it into the db. You can use http://us.php.net/mysql_real_escape_string to escape the input. On Jul 27, 2009, at 09:35, Ben Miller wrote: Hi, I have a form i

Re: [PHP] How to pull window to the foreground - Window Focus

2009-07-27 Thread Richard Heyes
Hi, > A lot of sites are moving to simulated dialog windows inside the page. There's an updated version of my ModalDialog included in RGraph which does just this: http://www.rgraph.net/docs/external.html It covers the page in a semi transparent DIV to bring attention to itself (the modal part).

Re: [PHP] Single Quotes in Form Inputs

2009-07-27 Thread Bastien Koert
On Mon, Jul 27, 2009 at 12:41 PM, Mari Masuda wrote: > You need to sanitize and escape the input before inserting it into the db. >  You can use http://us.php.net/mysql_real_escape_string to escape the input. > > On Jul 27, 2009, at 09:35, Ben Miller wrote: > >> Hi, >> >> >> >> I have a form in whi

Re: [PHP] How to pull window to the foreground - Window Focus

2009-07-27 Thread WebPat
Bastien Koert wrote: On Mon, Jul 27, 2009 at 11:39 AM, WebPat wrote: Andrew Ballard wrote: A lot of sites are moving to simulated dialog windows inside the page. They have a few nice benefits: 1) Since they aren't real windows, they do not interfere with other tabs or windows you have open in

Re: [PHP] Single Quotes in Form Inputs

2009-07-27 Thread Mari Masuda
You need to sanitize and escape the input before inserting it into the db. You can use http://us.php.net/mysql_real_escape_string to escape the input. On Jul 27, 2009, at 09:35, Ben Miller wrote: Hi, I have a form in which my sales reps can add new clients into the database, but I'm r

[PHP] Single Quotes in Form Inputs

2009-07-27 Thread Ben Miller
Hi, I have a form in which my sales reps can add new clients into the database, but I'm running into a problem if the client's name includes a single quote, such as O'Henry, when it comes time to input the form data into the database table. I'm guessing I need to use ereg_replace, or something

Re: [PHP] How to pull window to the foreground - Window Focus

2009-07-27 Thread Andrew Ballard
On Mon, Jul 27, 2009 at 11:46 AM, Bastien Koert wrote: > Back to the DIVs option, you can write js controls that make the > window dragable, hidable etc to improve the users enjoyment of the > page > > -- > > Bastien > Some implementations are definitely better than others. Like any other software

Re: [PHP] How to pull window to the foreground - Window Focus

2009-07-27 Thread Bastien Koert
On Mon, Jul 27, 2009 at 11:39 AM, WebPat wrote: > Andrew Ballard wrote: >> >> A lot of sites are moving to simulated dialog windows inside the page. >> They have a few nice benefits: >> >> 1) Since they aren't real windows, they do not interfere with other >> tabs or windows you have open in your b

Re: [PHP] How to pull window to the foreground - Window Focus

2009-07-27 Thread WebPat
Andrew Ballard wrote: A lot of sites are moving to simulated dialog windows inside the page. They have a few nice benefits: 1) Since they aren't real windows, they do not interfere with other tabs or windows you have open in your browser. 2) Since they are actually part of the page itself, the

Re: [PHP] Imposing a range on what is stored in a session variable

2009-07-27 Thread Bastien Koert
On Mon, Jul 27, 2009 at 11:25 AM, Shawn McKenzie wrote: > Miller, Terion wrote: >> >> >> On 7/27/09 9:40 AM, "Jim Lucas" wrote: >> >> Miller, Terion wrote: >>> I want to store only 1000 records at a time in the session variable thought >>> I could use a range(1,1000 >>> >>> How would you do t

Re: [PHP] Imposing a range on what is stored in a session variable

2009-07-27 Thread Jim Lucas
Miller, Terion wrote: > > > On 7/27/09 9:40 AM, "Jim Lucas" wrote: > > Miller, Terion wrote: >> I want to store only 1000 records at a time in the session variable thought >> I could use a range(1,1000 >> >> How would you do this, store the first 1000 , then the second on refresh etc >> >>

Re: [PHP] Imposing a range on what is stored in a session variable

2009-07-27 Thread Shawn McKenzie
Miller, Terion wrote: > > > On 7/27/09 9:40 AM, "Jim Lucas" wrote: > > Miller, Terion wrote: >> I want to store only 1000 records at a time in the session variable thought >> I could use a range(1,1000 >> >> How would you do this, store the first 1000 , then the second on refresh etc >> >>

Re: [PHP] Imposing a range on what is stored in a session variable

2009-07-27 Thread Bastien Koert
On Mon, Jul 27, 2009 at 10:54 AM, Miller, Terion wrote: > > > > =snipped >> > > I would page the data with the LIMIT call as Jim suggested. What is > the user doing with 1K records and how are they getting 1K records? > > -- > > Bastien > > Cat, the other other white meat > > > Here is a li

Re: [PHP] Imposing a range on what is stored in a session variable

2009-07-27 Thread Miller, Terion
=snipped > I would page the data with the LIMIT call as Jim suggested. What is the user doing with 1K records and how are they getting 1K records? -- Bastien Cat, the other other white meat Here is a link to the code at PasteBin It's a db full of the town's restaurant inspections

Re: [PHP] Imposing a range on what is stored in a session variable

2009-07-27 Thread Ashley Sheridan
On Mon, 2009-07-27 at 07:44 -0700, Miller, Terion wrote: > Well there are currently about 17000 records in the db, and my manager wants > to have it only pulling in 1000 at a time as a session range > And why do my code snippets always look so messed up , I put them in using > the rich text or ht

Re: [PHP] Imposing a range on what is stored in a session variable

2009-07-27 Thread Bastien Koert
On Mon, Jul 27, 2009 at 10:44 AM, Miller, Terion wrote: > Well there are currently about 17000 records in the db, and my manager wants > to have it only pulling in 1000 at a time as a session range > And why do my code snippets always look so messed up , I put them in using > the rich text or htm

Re: [PHP] Imposing a range on what is stored in a session variable

2009-07-27 Thread Miller, Terion
On 7/27/09 9:40 AM, "Jim Lucas" wrote: Miller, Terion wrote: > I want to store only 1000 records at a time in the session variable thought I > could use a range(1,1000 > > How would you do this, store the first 1000 , then the second on refresh etc > > My snippet so far > > --

Re: [PHP] Imposing a range on what is stored in a session variable

2009-07-27 Thread Miller, Terion
Well there are currently about 17000 records in the db, and my manager wants to have it only pulling in 1000 at a time as a session range And why do my code snippets always look so messed up , I put them in using the rich text or html settings in my Entourage mail... They look fine when I send th

Re: [PHP] More on "JS alert that links to file"

2009-07-27 Thread Ashley Sheridan
On Mon, 2009-07-27 at 07:43 -0700, Jim Lucas wrote: > Ashley Sheridan wrote: > > On Mon, 2009-07-27 at 07:34 -0700, Jim Lucas wrote: > >> tony mount wrote: > >>> I have a question that follows on from this discussion. I have a loop > >>> which creates a number of files. It first write each file to

Re: [PHP] More on "JS alert that links to file"

2009-07-27 Thread Jim Lucas
Ashley Sheridan wrote: > On Mon, 2009-07-27 at 07:34 -0700, Jim Lucas wrote: >> tony mount wrote: >>> I have a question that follows on from this discussion. I have a loop >>> which creates a number of files. It first write each file to a server >>> location then sets up the headers and asks the "S

Re: [PHP] Imposing a range on what is stored in a session variable

2009-07-27 Thread Jim Lucas
Miller, Terion wrote: > I want to store only 1000 records at a time in the session variable thought I > could use a range(1,1000 > > How would you do this, store the first 1000 , then the second on refresh etc > > My snippet so far > > --- >

Re: [PHP] More on "JS alert that links to file"

2009-07-27 Thread Andrew Ballard
On Mon, Jul 27, 2009 at 10:34 AM, Jim Lucas wrote: > Ashley's answer is correct.  But the one thing she ... He. Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] More on "JS alert that links to file"

2009-07-27 Thread Ashley Sheridan
On Mon, 2009-07-27 at 07:34 -0700, Jim Lucas wrote: > tony mount wrote: > > I have a question that follows on from this discussion. I have a loop > > which creates a number of files. It first write each file to a server > > location then sets up the headers and asks the "Save As" question. This > >

RE: [PHP] More on "JS alert that links to file"

2009-07-27 Thread Ashley Sheridan
On Mon, 2009-07-27 at 10:30 -0400, kyle.smith wrote: > You really can't send multiple files in a single response, and you certainly > can't send multiple headers after data has gone through. > > Zipping would be a nice approach. Another would be to use AJAX calls to > sequenctially download the

Re: [PHP] How to pull window to the foreground - Window Focus

2009-07-27 Thread Andrew Ballard
On Mon, Jul 27, 2009 at 10:26 AM, WebPat wrote: > Bastien Koert wrote: >> >> On Mon, Jul 27, 2009 at 8:31 AM, WebPat wrote: >>> >>> I have a web page with a button that displays additional information for >>> the >>> user. It does a Window.Open to create a "popup" window, then populates >>> it. >>>

Re: [PHP] More on "JS alert that links to file"

2009-07-27 Thread Jim Lucas
tony mount wrote: > I have a question that follows on from this discussion. I have a loop > which creates a number of files. It first write each file to a server > location then sets up the headers and asks the "Save As" question. This > works OK once, but after the first download it exits without

Re: [PHP] Imposing a range on what is stored in a session variable

2009-07-27 Thread Bastien Koert
On Mon, Jul 27, 2009 at 10:30 AM, Miller, Terion wrote: > I want to store only 1000 records at a time in the session variable thought I > could use a range(1,1000 > > How would you do this, store the first 1000 , then the second on refresh etc > > My snippet so far > > ---

RE: [PHP] More on "JS alert that links to file"

2009-07-27 Thread kyle.smith
You really can't send multiple files in a single response, and you certainly can't send multiple headers after data has gone through. Zipping would be a nice approach. Another would be to use AJAX calls to sequenctially download the files. HTH, - Kyle -Original Message- From: Ashley

[PHP] Imposing a range on what is stored in a session variable

2009-07-27 Thread Miller, Terion
I want to store only 1000 records at a time in the session variable thought I could use a range(1,1000 How would you do this, store the first 1000 , then the second on refresh etc My snippet so far --- // Process all results in

Re: [PHP] How to pull window to the foreground - Window Focus

2009-07-27 Thread WebPat
Bastien Koert wrote: On Mon, Jul 27, 2009 at 8:31 AM, WebPat wrote: I have a web page with a button that displays additional information for the user. It does a Window.Open to create a "popup" window, then populates it. If the user goes back to the web page without closing the window, it often

Re: [PHP] How to pull window to the foreground - Window Focus

2009-07-27 Thread Bastien Koert
On Mon, Jul 27, 2009 at 8:31 AM, WebPat wrote: > I have a web page with a button that displays additional information for the > user. It does a Window.Open to create a "popup" window, then populates it. > > If the user goes back to the web page without closing the window, it often > goes behind the

Re: [PHP] Question on code profiling

2009-07-27 Thread Andrew Ballard
On Sat, Jul 25, 2009 at 1:31 AM, Daniel Kolbo wrote: > Andrew Ballard wrote: >> On Thu, Jul 23, 2009 at 11:31 PM, Andrew Ballard wrote: >>> From what I can tell, the numbers I see in WinCacheGrind >>> look like they are off by about a factor of 10 pretty >>> uniformly. >>> >>> Andrew >>> >> >> Appa

Re: [PHP] JS alert that links to a file

2009-07-27 Thread Skip Evans
Hey all, With LinuxMan's help I got this working. It was a bit tricky as it's an AJAX environment, but what I did was create a separate page with code similar to what he has below and then call it from the JS side and it works great. Thanks all, and especially LinuxManMikeC for the key! Ski

[PHP] How to pull window to the foreground - Window Focus

2009-07-27 Thread WebPat
I have a web page with a button that displays additional information for the user. It does a Window.Open to create a "popup" window, then populates it. If the user goes back to the web page without closing the window, it often goes behind the browser and is not visible (which is not the probl

Re: [PHP] More on "JS alert that links to file"

2009-07-27 Thread Ashley Sheridan
I assume you want to force the files to the user as a series of files to download? Have you considered just offering a page of links to each file? You can actually have the links go to a PHP script which can stream the file as a forced download, and the user can then download the files one-by-one b

[PHP] More on "JS alert that links to file"

2009-07-27 Thread tony mount
I have a question that follows on from this discussion. I have a loop which creates a number of files. It first write each file to a server location then sets up the headers and asks the "Save As" question. This works OK once, but after the first download it exits without any errors or messages. If

RE: [PHP] open source forum

2009-07-27 Thread Bob McConnell
From: mrfroasty > I need some advice in picking a PHP forum for a group of people, I know > there are couple of them but could somebody from here give advice on > which one to choose. Your request is a bit open ended. Are you looking for blogs, wiki, message based, or what? A couple of years ago

Re: [PHP] open source forum

2009-07-27 Thread mrfroasty
Thanks for the input, after playing around the choicesI think I might go for SMF. Looks pretty cool software, So far I have checked Phorum, phpBB and SMF only. The only negative thing I can tell so far is there is no gettext infrastructure on SMF or phorum...but atleast there is a means to tra

Re: [PHP] Saving server side file to local machine with JS

2009-07-27 Thread Thijs Lensselink
Skip Evans wrote: > Sorry, I should have been clearer. > > When PHP finishes creating the file I need one of the JS alert type > windows to appear that says.. > > "Your file has completed, would you like to save it to your machine?" > > Like you get when you download a file. > > If I knew the J