[PHP] addslashes($variable)?

2002-09-01 Thread cLeAnEr

Hi.
I have recently started prograemming some php. Now I wonder exactly what
addslashes() is good for...
I´ve read about it that it insert slashes where needed to get data in right
form to Mysql? and then use stripeslashes() to remove slashes when reciving
data out of database?

And I´ve also got this article that its good for not getting a harmful query
along with my own query
$sql="SELECT * FROM adresses;DELETE * FROM adress"  ???

plz explain to me!

reg: Niclas



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




[PHP] array_chunk() - use or not use?

2002-09-20 Thread cLeAnEr

Hi!

I got this problem getting my uploaded pictures listed in a table 3 by 3.
The script below works fine and make a nice listing vetically...

Now, how the heck do I script so that I get 3 pictures in a row, in separat
colums and adding a new row so next 3 pictures get the same formatting?

I looked into array_chunk() but I cant figure out how to use it? should i
split $pic_out and use a foreach on that array? or just $nr=count($pic_out);
and then run an if-statment to see if I get it out...well I hope u can give
me some help cuz this is driving me mad

reg: cleaner





 ";
 }//end While
?>






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




[PHP] headers?

2002-09-28 Thread cleaner

Hi all..

Got this script to verify a login against a mysql-databas with several
checking for type errors etc.

When I wanna login people, I include a file with all my functions
('functions.php') and I a function verify is called upon.

the function returns false if user entered wrong user/pass, And if they
enter correct info I want them to be redirected to another page.. hm. the
headers cant be added (u heard that before?) cuz my login form already
started output...

function verify($user,$pass){
// some sql queries here...

 if(count($number)>0){
return false;
}else{
   header("Location:admin.php");
   }

}

I would like som help using headers in a correct way, or be able to use
another way...


reg:cleaner



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




Re: [PHP] headers?

2002-09-28 Thread cleaner

I´ll do that...I hope thats the problemthanks a LOT!

"Debbie_dyer" <[EMAIL PROTECTED]> skrev i meddelandet
00d601c266fe$2f4d32f0$0100a8c0@homepc">news:00d601c266fe$2f4d32f0$0100a8c0@homepc...
> It's giving you this error because you are sending the headers after
> outputting something (which could be just  a blank line) - check in your
> functions.php that you dont have any blank lines before the start of or
> after the end of your script. ie. before the 
>
> Debbie
> - Original Message -
> From: "cleaner" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Saturday, September 28, 2002 3:23 PM
> Subject: [PHP] headers?
>
>
> > Hi all..
> >
> > Got this script to verify a login against a mysql-databas with several
> > checking for type errors etc.
> >
> > When I wanna login people, I include a file with all my functions
> > ('functions.php') and I a function verify is called upon.
> >
> > the function returns false if user entered wrong user/pass, And if they
> > enter correct info I want them to be redirected to another page.. hm.
the
> > headers cant be added (u heard that before?) cuz my login form already
> > started output...
> >
> > function verify($user,$pass){
> > // some sql queries here...
> >
> >  if(count($number)>0){
> > return false;
> > }else{
> >header("Location:admin.php");
> >}
> >
> > }
> >
> > I would like som help using headers in a correct way, or be able to use
> > another way...
> >
> >
> > reg:cleaner
> >
> >
> >
> > --
> > 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