Re: [PHP] Re: Checkbox in PHP form

2009-11-08 Thread Brian Hazelton

 value="PFDs"
name=f_sequipment1>PFDs


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



Re: [PHP] � Frontier Acela High Performan ce Fume Hoods

2009-11-03 Thread Brian Hazelton

My guess is that it is some sort of spam.

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



Re: [PHP] getcsv error

2009-10-25 Thread Brian Hazelton

Brian Hazelton wrote:

Brian Hazelton wrote:
I have a script which uploads csv data into a database. This works 
well and has worked in every instance so far. However what I am 
noticing is that today, even if I escape the data before putting it 
into mysql it will not enter a line if it has a single quote, once I 
take out the single quote it enters it into the database so I know it 
is the single quote, is this an error or are single quotes not 
allowed in csv...?



I figured out part of the problem. The problem lies with one of my 
functions for cleaning the data before putting it into the database. I 
have a function, see below, that will clean the data to put into mysql 
and work whether magic quotes is on or off. It is not working because 
I echo the query and the part I need escaped is not being escaped. I 
try mysql_real_escape_string and it is being escaped by that so I 
think the problem is something with my function, if anyone can help 
that would be appreciated.


function clean($str){
   if(get_magic_quotes_gpc()){
   stripslashes($str);
   mysql_real_escape_string($str);
   return $str;
   }
   else{
   mysql_real_escape_string($str);
   return $str;
   }
}



$name = 'O'Leksy';
$cleaned_name = clean($name);

echo of $cleaned name = O'Leksy';
if mysql_real_escape_string is used it echoes O\'Leksy';


Sorry for all of the posts. I got it figured out, it was just me being 
stupid. Since this data isnt coming from get, post or cookies then 
calling this function will still work but no slashes are getting added 
so when the stripslashes function is called it returns an error and will 
not continue to work because it does not return the string on error.


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



Re: [PHP] getcsv error

2009-10-25 Thread Brian Hazelton

Brian Hazelton wrote:
I have a script which uploads csv data into a database. This works 
well and has worked in every instance so far. However what I am 
noticing is that today, even if I escape the data before putting it 
into mysql it will not enter a line if it has a single quote, once I 
take out the single quote it enters it into the database so I know it 
is the single quote, is this an error or are single quotes not allowed 
in csv...?



I figured out part of the problem. The problem lies with one of my 
functions for cleaning the data before putting it into the database. I 
have a function, see below, that will clean the data to put into mysql 
and work whether magic quotes is on or off. It is not working because I 
echo the query and the part I need escaped is not being escaped. I try 
mysql_real_escape_string and it is being escaped by that so I think the 
problem is something with my function, if anyone can help that would be 
appreciated.


function clean($str){
   if(get_magic_quotes_gpc()){
   stripslashes($str);
   mysql_real_escape_string($str);
   return $str;
   }
   else{
   mysql_real_escape_string($str);
   return $str;
   }
}



$name = 'O'Leksy';
$cleaned_name = clean($name);

echo of $cleaned name = O'Leksy';
if mysql_real_escape_string is used it echoes O\'Leksy';


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



[PHP] getcsv error

2009-10-25 Thread Brian Hazelton
I have a script which uploads csv data into a database. This works well 
and has worked in every instance so far. However what I am noticing is 
that today, even if I escape the data before putting it into mysql it 
will not enter a line if it has a single quote, once I take out the 
single quote it enters it into the database so I know it is the single 
quote, is this an error or are single quotes not allowed in csv...?



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



[PHP] Ubuntu and Apache

2009-10-24 Thread Brian Hazelton
I know this is not quite on topic but I do not know where else to turn. 
I needed to reinstall ubuntu and now I cannot change myself to be the 
owner of var www. I had been able to change myself to the owner of it 
and create, delete and modify any files I wanted before I had to 
reinstall. Now it seems the change is not taking effect. What happens  
is I use the sudo chown command and it shows that I am the owner. I have 
a script that creates a file when I go to the page and it creates a file 
and has www-data as the owner, not me. What am I doing wrong?

Thanks,
Brian

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



Re: [PHP] PHP broadcast mailer

2009-10-16 Thread Brian Hazelton
I thought about doing a batch email, is that an accepted practice, also 
how do I find my smtp server limit?


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



[PHP] PHP broadcast mailer

2009-10-16 Thread Brian Hazelton
I am in charge of an email newsletter list and making sure it gets sent 
out in time. My problem is I have never done broadcast emailing and 
right now we have 400 subscribers but want to build a system that can 
scale well regardless of the number of subscribers. Right now I use 
mysql to store the email and use phpmailer in a loop to send an email to 
each of the emails in the db, it is already slow with just 400(takes 
around 10 min (i think that's slow isnt it?). Has anyone built a 
broadcast email script and willing to help me?


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