OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
php-general Digest 13 May 2003 11:24:17 -0000 Issue 2054

php-general-digest-helplists.php.net
Date: Tue May 13 2003 - 06:24:17 CDT


php-general Digest 13 May 2003 11:24:17 -0000 Issue 2054

Topics (messages 147368 through 147411):

Re: WHY will this not work - you must name a button to use it ;-)
        147368 by: Brian V Bonini

Re: Getting result from URL
        147369 by: John Coggeshall
        147370 by: Stephen
        147372 by: John Coggeshall

Session problem....with win2000server
        147371 by: Rodrigo

Why is this needed??
        147373 by: Sparky Kopetzky
        147374 by: John Coggeshall
        147376 by: Jennifer Goodie
        147392 by: Sparky Kopetzky

Totally OT, netscape screwing my neat table PLEASE HELP
        147375 by: Ryan A
        147378 by: Ryan A
        147380 by: Ryan A

major custom error handler clash
        147377 by: daniel.electroteque.org

PHP connecting to Microsoft SQL 7 / 2000
        147379 by: Aris Santillan
        147383 by: Jason Sheets

Re: how to use strstr() (or similar) on an array?
        147381 by: Justin French

Re: Need an ASP guestbook application
        147382 by: Justin French

Re: Simple #%#% array/function not working....
        147384 by: David Robley

Year Make Model Database
        147385 by: Jonathan Pitcher
        147387 by: Justin French
        147389 by: Jonathan Pitcher
        147390 by: Hugh Bothwell
        147391 by: Eddie Shipman

unsub
        147386 by: Luis A

Re: PHP problem
        147388 by: David Robley

Display an image through PHP
        147393 by: Greg Beaver
        147395 by: Bobby Patel

Problem on loop upload images
        147394 by: Dani Matielo

Re: Auto-Post form data
        147396 by: Gerhard Petrowitsch
        147397 by: Marcus Rasmussen

PHP creating two session cookies?
        147398 by: Ben Lake

include() is being EXTREMELY slow
        147399 by: Police Trainee
        147401 by: Justin French

reload a page
        147400 by: Mukta Telang
        147403 by: Justin French
        147404 by: John Coggeshall

PKI structure
        147402 by: ro6avia

Re: GD transparency problem
        147405 by: Steve M

EMAIL
        147406 by: Diksha Neel
        147411 by: Tim Grote

Convert UTF-8 to UTF-16
        147407 by: Sephiroth

Mail Sending
        147408 by: Shaun
        147409 by: Randum Ian

Re: performance question with htmlspecialchars,strip_tags
        147410 by: Marek Kilimajer

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscribelists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscribelists.php.net

To post to the list, e-mail:
        php-generallists.php.net

----------------------------------------------------------------------

attached mail follows:


On Mon, 2003-05-12 at 18:37, Daevid Vincent wrote:
> No. you have to name the button.
>

AHHHHHHH!!! Thanks!! :-)

attached mail follows:


On Mon, 2003-05-12 at 19:22, Stephen wrote:
> I have a URL that if you send it parameters, it gives back a result in plain text. What I want to do is dynamically send the parameters to the URL, get the result back, and display certain information on the result.

You mean like a web service type of thing?

> My question is.. How would I get the result from the URL after sending it the parameters?

If all you need to do is capture the data sent from a HTTP request, from
PHP 4.3.0 and up you can use streams with anything using a file
reference (like fopen, fread, fgets, etc)... hence:

        $doc = "";
        $fr = fopen("http://www.coggeshall.org/index.php?foo=1&bar=2", 'r');
        while(!feof($fr)) {
                $doc .= fread($fr, 1024);
        }
        fclose($fr);

If you need to pass parameters to the remote script via the POST method,
things are a bit more complex -- but that's basically the idea.

John
--
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
John Coggeshall
john at coggeshall dot org http://www.coggeshall.org/
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-

attached mail follows:


No, I'm sending them using the GET method. Thank you so much! This script
might end up being published so what should I do incase a server is not
running 4.3.0?

Thanks,
Stephen Craton
http://www.melchior.us

----- Original Message -----
From: "John Coggeshall" <johncoggeshall.org>
To: "Stephen" <webmastermelchior.us>
Cc: "PHP List" <php-generallists.php.net>
Sent: Monday, May 12, 2003 6:29 PM
Subject: Re: [PHP] Getting result from URL

On Mon, 2003-05-12 at 19:22, Stephen wrote:
> I have a URL that if you send it parameters, it gives back a result in
plain text. What I want to do is dynamically send the parameters to the URL,
get the result back, and display certain information on the result.

You mean like a web service type of thing?

> My question is.. How would I get the result from the URL after sending it
the parameters?

If all you need to do is capture the data sent from a HTTP request, from
PHP 4.3.0 and up you can use streams with anything using a file
reference (like fopen, fread, fgets, etc)... hence:

$doc = "";
$fr = fopen("http://www.coggeshall.org/index.php?foo=1&bar=2", 'r');
while(!feof($fr)) {
$doc .= fread($fr, 1024);
}
fclose($fr);

If you need to pass parameters to the remote script via the POST method,
things are a bit more complex -- but that's basically the idea.

John
--
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
John Coggeshall
john at coggeshall dot org http://www.coggeshall.org/
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-

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

attached mail follows:


URL wrappers have existed in PHP since PHP3, just not to the universal
extent they do today. fopen() URL wrappers have been around for a long
time, however older versions of PHP may need to be compiled with
--enable-url-fopen-wrapper to work (I think it prior to 4.0.3, but don't
quote me).

Also, make sure you have allow_url_fopen = On in your php.ini file.

John
--
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
John Coggeshall
john at coggeshall dot org http://www.coggeshall.org/
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-

attached mail follows:


Hi people,
 
Does anyone know what i need to do make php session work in IIS 5.0 with
Win 2000 Server.
 
I put in the php.ini the session.save_path =c:\winnt\temp and I set all
the permissions right ( I hope ).
But the session still not working, I hope anyone can help me.
I´m using active direct with win2000Server.
 
Thanks in advance.
  _____

  Equipe Pratic Sistemas
  Rodrigo Corrêa
  Fone: (14) 441-1700
  suportepraticsistemas.com.br
  rodrigopraticsistemas.com.br
 

attached mail follows:


I was having a problem connecting to Mysql and found this line in the user's note in the documentation:

$dbl = mysql_connect($dbms_hn, $dbms_un, $dbms_pw);

I tried the '' in my code and BANG! it worked. I was able to connect. What does the '' do for you???

Robin Kopetzky
Black Mesa Internet Services

attached mail follows:


> I tried the '' in my code and BANG! it worked. I was able to connect. What does the '' do for you???

http://www.php.net/manual/en/language.operators.php

The operator surpresses error messages generated by the statement. If
it's not display an error message anymore, that's just because you are
hiding the error message.

John
--
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
John Coggeshall
john at coggeshall dot org http://www.coggeshall.org/
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-

attached mail follows:


> $dbl = mysql_connect($dbms_hn, $dbms_un, $dbms_pw);
>
> I tried the '' in my code and BANG! it worked. I was able to
> connect. What does the '' do for you???

The did not fix the problem, it merely hid it. The operator is used to
suppress errors. It could be that your connection is still failing, but PHP
will try to connect to run a query if a connection is not present, and the
connection PHP is trying to make on its own is succeeding where yours is
still failing. Or it could be that you changed something else in your
connection string. I would not suggest suppressing errors during
development, but rather adding suppression right before you go live. Read
the manual sections on mysql_query, mysql_connect and error suppression for
more information.
http://www.php.net/manual/en/function.mysql-query.php
http://www.php.net/manual/en/function.mysql-connect.php
http://www.php.net/manual/sv/language.operators.errorcontrol.php

attached mail follows:


OK. I get it. But I've checked phpinfo and I know mysql access is compiled
into my php system. I can connect to mysql from any computer in the
building, so I know mysql is alive and kicking. Is there any REAL test that
I can use to make sure everything is configured right on my system???

I'm running RH8.0 right out of the box. I made sure everything was right in
the php.ini, restarted apache and still have this problem.

Robin Kopetzky
Black Mesa Internet Services

attached mail follows:


Hi guys,
I am creating a webhosting directory in PHP but first we cant seem to get
#%# template to work, I know at least one of you guys must have had the
same problem so PLEASE tell me how you solved it.

I have searched google and been to forums for the past hour and a
half/changed doctypes and what not but it still does not work.

It displays fine in IE but in NN 4.7 the left of the table gets "chewed".
If i take out nested table everything looks good, but as i put back the
nexted table .....

Heres the URL: http://bestwebhosters.com/proto/o.htm

Kindly reply,
-Ryan

attached mail follows:


Hey John,
Thanks for replying.

Yes, I know my html is good, i went through every damn character manually
but #%#^$ NN is screwing it up, right now if I got my hands on the
programmer who was mainly in charge NN i promise you there would be murder
:-)
2 freaking hours and still nothing, just a lots of complaints on google and
other damn problems with NN.
Yeah, I took out the ALT tags to save on space..

Thanks for trying though.

-Ryan

>
> I have no idea why it would do that, however I can at least eliminate
> one possibility -- your HTML document IS correct, I ran it through TIDY
> for you and it only came up with some warnings (like missing ALT tags
> for images, etc).
>
> John
> --
> -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
> John Coggeshall
> john at coggeshall dot org http://www.coggeshall.org/
> -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
>

attached mail follows:


HEY!
May Allah,buddah,Ram,Sham and any anyone else be praised! The damn thing
actually works!
I cant believe i spent over 2 hours when all i had to do was change the "2"
to a "0".
You're a genius.

THANK YOU.

Cheers,
-Ryan

P.S if you are wondering why no holy christian name was mentioned..."do not
take the name of the lord your god in vaid" :-D

----- Original Message -----
From: "Martin Towell" <martin.towellworld.net>
To: "'Ryan A'" <ryanjumac.com>
Sent: Tuesday, May 13, 2003 2:30 AM
Subject: RE: [PHP] Totally OT, netscape screwing my neat table PLEASE HELP

> Try changing your nav table from
>
> <table width="100%" border="0" align="right" cellpadding="2"
> cellspacing="2">
>
> to
>
> <table width="100%" border="0" align="right" cellpadding="2"
> cellspacing="0">
>
> -----Original Message-----
> From: Ryan A [mailto:ryanjumac.com]
> Sent: Tuesday, May 13, 2003 10:22 AM
> To: John Coggeshall
> Cc: php-generallists.php.net
> Subject: Re: [PHP] Totally OT, netscape screwing my neat table PLEASE
> HELP
>
>
> Hey John,
> Thanks for replying.
>
> Yes, I know my html is good, i went through every damn character manually
> but #%#^$ NN is screwing it up, right now if I got my hands on the
> programmer who was mainly in charge NN i promise you there would be murder
> :-)
> 2 freaking hours and still nothing, just a lots of complaints on google
and
> other damn problems with NN.
> Yeah, I took out the ALT tags to save on space..
>
> Thanks for trying though.
>
> -Ryan
>
> >
> > I have no idea why it would do that, however I can at least eliminate
> > one possibility -- your HTML document IS correct, I ran it through TIDY
> > for you and it only came up with some warnings (like missing ALT tags
> > for images, etc).
> >
> > John
> > --
> > -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
> > John Coggeshall
> > john at coggeshall dot org http://www.coggeshall.org/
> > -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

attached mail follows:


hi there , i have been rebuilding my classes with their own custom error
handler function and i usually use trigger_error to trigger an error
internally , i have a DB and Auth class which both are used together ,

the constructors in the error classes look like

$GLOBALS['_ERROR_HANDLER_OBJECT_DB'] = &$this;
        $GLOBALS['_ERROR_HANDLER_METHOD_DB'] = '_catch';
                function db_error_handler($type, $message, $file=null,
$line=null, $vars=null) {
                        return $GLOBALS['_ERROR_HANDLER_OBJECT_DB']->
$GLOBALS['_ERROR_HANDLER_METHOD_DB']($type,$message, $file, $line, $vars);
        }
        set_error_handler('db_error_handler');

and in my erorr handler class it looks like

$db_error = new DB_Mysql_Error(true);
$auth_error = new HTTP_Auth_Error;

if i have the auth error after the db , if i get a mysql error the auth
error will be fired, if i switch it around , if i get an auth error the db
error will be fired off , i have to setup the error objects as just setting
up the base classes will not trigger these :\ , this suddenly just
happended this morning where they were only working just the other day ,
what can i do ?

attached mail follows:


hi guys!

what do i need to install in linux to be able
for php to connect to MS SQL server 7 / 2000?

thanks

attached mail follows:


You can use the freetds library to connect to MS SQL server.

Take a look at http://www.php.net/sybase

I installed FreeTDS into /usr/local/freetds and then configured PHP
--with-sybase=/usr/local/freetds, this will activate the sybase and
mssql_ functions. When I compiled --with-mssql the mssql_connect
function did not return a valid connection ID even though everything was
correct.

The user contributed notes and the documentation at www.freetds.org
should get you going.

Jason

Aris Santillan wrote:

> hi guys!
>
>
> what do i need to install in linux to be able
> for php to connect to MS SQL server 7 / 2000?
>
>
> thanks
>

attached mail follows:


This will solve the problem of only showing line with ALL search words in
it, but I don't have the skills to figure out the bolding problem within
tags, so i've left the strip_tags() line in there.

Good luck.

<?

$src_trm = "one two";
$searchWords = explode(' ',$src_trm);

$handle = fopen("searchee.txt", "r");
while(!feof($handle))
    {
    $buffer = strip_tags(fgets($handle, 4096));
    foreach($searchWords as $word)
        {
        $pos = strpos($buffer,$word);
        if($pos === false)
            {
            // not found
            }
        else
            {
            $wordFound++;
            $buffer = str_replace($word,"<b>{$word}</b>",$buffer);
            }
        }
    if($wordFound >= count($searchWords))
        {
        echo $buffer."<br />";
        }
    $wordFound = 0;
    }
fclose($handle);

?>

Justin

on 13/05/03 12:42 AM, iliketheworldgmx.ch (iliketheworldgmx.ch) wrote:

>> <?
>>
>> $src_trm = "one two";
>> $searchWords = explode(' ',$src_trm);
>>
>> $handle = fopen("searchMe.txt", "r");
>> while(!feof($handle))
>> {
>> $buffer = fgets($handle, 4096);
>> foreach($searchWords as $word)
>> {
>> $pos = strpos($buffer,$word);
>> if($pos === false)
>> {
>> // not found
>> }
>> else
>> {
>> $wordFound = 1;
>> }
>> }
>> if($wordFound)
>> {
>> echo $buffer."<br />";
>> }
>> $wordFound = 0;
>> }
>> fclose($handle);
>>
>> ?>

attached mail follows:


on 13/05/03 12:04 AM, bbonkosktampabay.rr.com (bbonkosktampabay.rr.com)
wrote:

> You going to post this every 20 minutes?
> Just wondering why you would ask a PHP list for an ASP application? Are there
> no ASP lists where it could be more appropriate for you to ask?

ASP can also mean Application Service Provider.

Justin

attached mail follows:


In article <005f01c317c7$802c6630$1701400al2zcaxu7emppqh>, ryanjumac.com
says...
> Hi,
> Am kind of new to php and brand new to arrays so please excuse me if this is
> a stupid way of doing things.
>
> I have an array and its working fine, but when i try to call a function that
> checks if the array isset i dont get the required output.
> Heres the code below:
>
> if (is_array($id)) { print "<pre>\$id = "; print_r($id); print
> "</pre>\n"; } //working fine
> $result = count ($id); //working fine
> print($result); //working fine
>
> function one()
> {
> if(isset($id[0]))
> return("test=".$id[0]);
> }
> echo "<h1>testing".one()."</h1>"; //HERES the problem, this is only
> printing "testing" instaed of "testing(array value)"
>
>
> Any ideas?

Yes. To access the value of $id[] in the function you either need to pass
it as a parameter to the function, or declare it global in the function.
Then you might want to assign the return from the function to a variable
which you then echo.

You might want to read up on the scope of variables in the manual.

--
Quod subigo farinam

$email =~ s/oz$/au/o;

attached mail follows:


I am trying to create a Vehicle pull down menu system that holds the
vehicle make model and year. I have spent the last 2 hours looking a
master list but I have had no luck finding one. Can anyone point me in
the right direction?
Thanks,

Jonathan Pitcher

attached mail follows:


Master list for what country?

I know for a fact that the US doesn't have a Holden Commodore or Ford Falcon
(the two most popular family cars in Australia), so it's pretty pointless me
giving you an Australian list, isn't it?

Justin

on 13/05/03 12:05 PM, Jonathan Pitcher (jpitchercfedc.com) wrote:

> I am trying to create a Vehicle pull down menu system that holds the
> vehicle make model and year. I have spent the last 2 hours looking a
> master list but I have had no luck finding one. Can anyone point me in
> the right direction?
> Thanks,
>
> Jonathan Pitcher
>
>

attached mail follows:


Master list for the USA.

> Master list for what country?
>
> I know for a fact that the US doesn't have a Holden Commodore or Ford
> Falcon (the two most popular family cars in Australia), so it's pretty
> pointless me giving you an Australian list, isn't it?
>
> Justin
>
>
> on 13/05/03 12:05 PM, Jonathan Pitcher (jpitchercfedc.com) wrote:
>
>> I am trying to create a Vehicle pull down menu system that holds the
>> vehicle make model and year. I have spent the last 2 hours looking a
>> master list but I have had no luck finding one. Can anyone point me
>> in the right direction?
>> Thanks,
>>
>> Jonathan Pitcher
>>
>>

attached mail follows:


"Jonathan Pitcher" <jpitchercfedc.com> wrote in message
news:3746.65.26.140.96.1052787950.squirrelwww.cfedc.com...
> I am trying to create a Vehicle pull down menu system that holds the
> vehicle make model and year. I have spent the last 2 hours looking a
> master list but I have had no luck finding one. Can anyone point me in
> the right direction?

You mean, like
http://www.blackbookusa.com/electronicproducts.asp
... the used car CD they want US$388 for?

You could try to figure out the parameters passed to
http://www.kbb.com/kb/ki.dll/kw.kc.uy?kbb.NY;;NY011&13034;r&22&&
and screen-scrape it.

attached mail follows:


Try this also: N.A.D.A. XML Services
N.A.D.A.'s latest tool available for our developer partners
is our new XML service. This new service allows you to develop
your own internet capable applications (not implementation
specific) to communicate directly with N.A.D.A.'s valuation
services via XML. This service removes the burden of maintaining
current versions of the N.A.D.A. database and valuation engine
on your own network, while giving you control and processing
flexibility needed for your own specific application. Plus, it
provides transparency to client applications for changes made
at the core business layer.

http://www.nada.com/b2b/products/xml_services.asp?s=ntLTbCRQ-7873538-8317

> -----Original Message-----
> From: Hugh Bothwell [mailto:hugh_bothwellhotmail.com]
>
> "Jonathan Pitcher" <jpitchercfedc.com> wrote in message
> news:3746.65.26.140.96.1052787950.squirrelwww.cfedc.com...
> > I am trying to create a Vehicle pull down menu system that holds the
> > vehicle make model and year. I have spent the last 2 hours looking a
> > master list but I have had no luck finding one. Can anyone point me in
> > the right direction?
>
> You mean, like
> http://www.blackbookusa.com/electronicproducts.asp
> ... the used car CD they want US$388 for?
>
>
> You could try to figure out the parameters passed to
> http://www.kbb.com/kb/ki.dll/kw.kc.uy?kbb.NY;;NY011&13034;r&22&&
> and screen-scrape it.

attached mail follows:


attached mail follows:


In article <Sea1-DAV279qG96gKms0000704ahotmail.com>,
djdaz2002hotmail.com says...
> Hi
> I don't know if you guys are the right people to handle these problems,
> but if you are, i have a script on my custom error page that is designed
> to get the url of the page that gave the error and save it into a text
> document, it does this but the error page is always error.php. I don't know what is wrong with it so maybe you guys could check it. I have
> attached my error.php page and my .htaccess.
> Thanks in advance.
> Daz.
>

You'll need to include rather than attach as the mailing list probably
strips attachments.

--
Quod subigo farinam

$email =~ s/oz$/au/o;

attached mail follows:


Hi,

I'm trying to display an image dynamically, by extracting it from a
database. I've read the user-contributed notes at php.net for the
header() command, and also experimented with using the headers returned
from a direct look at a real .jpg and came up with this code:

     $picture = mysql_fetch_row($res);
     header('Accept-Range: bytes');
     header('Content-Length: '.strlen($picture[0]));
     header('Content-Type: '.$picture[1]);
     header('Content-Disposition: inline; filename=file.jpg');
     echo $picture[0];

Assume that $picture is an array, [0] is the image data, and [1] is the
mime type (in other words, assume valid inputs)

Using this code, I get a broken image.

Anyone with header experience know how to trick the browser into
displaying the stupid picture?

Thanks,
Greg

attached mail follows:


Header( "Content-type: ".picture[1]);
echo $picture[0];

The above code is all I use. What I ran into before was that I had the
datatype too small in the database, so I would get a broken image. Make sure
you have the data column atleast as a Blob (that's for upto 64 Kb images),
and bigger blobs will give you more (medium blob is 16MB)

Also when you store the image I use this (notice the use of
mysql_escape_string):

        $image_tmp_name = $image ['tmp_name'];
        $image_data = mysql_escape_string(fread(fopen($image_tmp_name, "r"),
filesize($image_tmp_name)));

Hope that helps

"Greg Beaver" <gregchiaraquartet.net> wrote in message
news:3EC073B4.3000001chiaraquartet.net...
> Hi,
>
> I'm trying to display an image dynamically, by extracting it from a
> database. I've read the user-contributed notes at php.net for the
> header() command, and also experimented with using the headers returned
> from a direct look at a real .jpg and came up with this code:
>
> $picture = mysql_fetch_row($res);
> header('Accept-Range: bytes');
> header('Content-Length: '.strlen($picture[0]));
> header('Content-Type: '.$picture[1]);
> header('Content-Disposition: inline; filename=file.jpg');
> echo $picture[0];
>
> Assume that $picture is an array, [0] is the image data, and [1] is the
> mime type (in other words, assume valid inputs)
>
> Using this code, I get a broken image.
>
> Anyone with header experience know how to trick the browser into
> displaying the stupid picture?
>
> Thanks,
> Greg
>

attached mail follows:


Hello,

for ($i=1; $i<=$quantas; $i++) {
  if (trim($_FILES['imagem']['name'][$i])!="") {
  //this is the original name of the image(imagem[$i] was the field in the
form)
  $file_name = $_FILES["$imagem"]["name"][$i];
  //heres the place on the server
  $file_path = $_FILES["$imagem"]["tmp_name"][$i];
  //heres the original extension
  $extensao = substr ($file_name,-3,3);
  //heres some other information
  $id_materia=$_POST['id_materia'];
  //the name of the image is a composition
  $nome_imagem = "imagem_".$id_materia."_".$i.".".$extensao;
  //this is the place ill put it
  $new_path = "c:/apache/htdocs/cirandabrasil/img/materias/".$nome_imagem;
  //this is moving
  move_uploaded_file ($file_path, $new_path);
  //this is inserting on the db
  $imagens = $imagem[$i];
  mysql_query("INSERT INTO materias_imagens (id_materia, nome)
VALUES('$id_materia', '$nome_imagem')");
  echo "Materia ".$i." ok.<br>";
 };

the name things work well, and I get the information on the db, but not the
extension... meaning that the files are not uploaded!! What am I doing
wrong?

Thank you, :)

Dani

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.476 / Virus Database: 273 - Release Date: 24/4/2003

attached mail follows:


What is curl ?

----- Original Message -----
From: "Jason Wong" <php-generalgremlins.biz>
To: <php-generallists.php.net>
Sent: Monday, May 12, 2003 8:57 PM
Subject: Re: [PHP] Auto-Post form data

> On Tuesday 13 May 2003 00:07, Gerhard Petrowitsch wrote:
> > Thanks Philips for your reply. I think that might help.
> > But I suspect, that it won't work with an https:// type
> > connection? Do I just have to adapt the port number
> > used in the fsockopen function to get it to run with https ?
> > If so, which port number must I use?
>
> Have a look at curl.
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
> ------------------------------------------
> Search the list archives before you post
> http://marc.theaimsgroup.com/?l=php-general
> ------------------------------------------
> /*
> One reason why George Washington
> Is held in such veneration:
> He never blamed his problems
> On the former Administration.
> -- George O. Ludcke
> */
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

attached mail follows:


It wont hurt to research before asking.

Try a search for curl at php.net. (It definitely will give you the answer.)

-------------------------------------------------------------
On 13-05-2003 at 07:00 Gerhard Petrowitsch wrote:
-------------------------------------------------------------

What is curl ?

----- Original Message -----
From: "Jason Wong" <php-generalgremlins.biz>
To: <php-generallists.php.net>
Sent: Monday, May 12, 2003 8:57 PM
Subject: Re: [PHP] Auto-Post form data

> On Tuesday 13 May 2003 00:07, Gerhard Petrowitsch wrote:
> > Thanks Philips for your reply. I think that might help.
> > But I suspect, that it won't work with an https:// type
> > connection? Do I just have to adapt the port number
> > used in the fsockopen function to get it to run with https ?
> > If so, which port number must I use?
>
> Have a look at curl.
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
> ------------------------------------------
> Search the list archives before you post
> http://marc.theaimsgroup.com/?l=php-general
> ------------------------------------------
> /*
> One reason why George Washington
> Is held in such veneration:
> He never blamed his problems
> On the former Administration.
> -- George O. Ludcke
> */
>
>
> --
> 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

attached mail follows:


Howdy,

I am having a rather interesting problem. I went into the php.ini file
to change the default session.name from PHPSESSID to UID and now I get
two _COOKIE's! One with UID and one with PHPSESSID, plus they both have
different values! Is there a setting I'm missing somewhere?

Thanks,

Ben

attached mail follows:


greetings. my webhost recently switched to a new
provider with the latest version of php with apache on
unix.

I have had nothing but problems with include() since
then. Aside from not being able to include most (but
not all) remote html files, even the LOCAL html, text,
or php files being called locally by include() are
taking extremely long to include (4-5 seconds).

The files to be included are no longer than 2 to 10
lines of text, but the delay is well into 4-5 seconds
(which is considerably too long given that php is
supposedly one of the fastest languages).

I did not have this problem with my previous server.
files (both remotely and locally) were included in a
split second. Ideas? Help? Please?? Thank you.

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

attached mail follows:


The first thing you do when your site gets moved to another server is to
create a couple of phpinfo() files, place one on each server, and compare
the settings/features.

You could/should address the differences with your host, looking to get the
two packages as similar as possible, within reason.

If, for example, safe mode is ON on the new server, and was OFF on the old,
then this would make a HUGE difference -- I'm not sure if it would affect
your specific script and problem, but getting the settings as equal as
possible would be a nice start... as would searching for a new ISP, since
the problem is more than likely NOT your scripts, since they WERE working.

Justin

on 13/05/03 5:17 PM, Police Trainee (policetraineeyahoo.com) wrote:

> greetings. my webhost recently switched to a new
> provider with the latest version of php with apache on
> unix.
>
> I have had nothing but problems with include() since
> then. Aside from not being able to include most (but
> not all) remote html files, even the LOCAL html, text,
> or php files being called locally by include() are
> taking extremely long to include (4-5 seconds).
>
> The files to be included are no longer than 2 to 10
> lines of text, but the delay is well into 4-5 seconds
> (which is considerably too long given that php is
> supposedly one of the fastest languages).
>
> I did not have this problem with my previous server.
> files (both remotely and locally) were included in a
> split second. Ideas? Help? Please?? Thank you.

attached mail follows:


Hi,
I want to reload a page each time it is reached by pressing "back"
button.
How to do it?
Mukta

attached mail follows:


on 13/05/03 11:15 PM, Mukta Telang (muktadarya.nio.org) wrote:

> Hi,
> I want to reload a page each time it is reached by pressing "back"
> button.

That's not the way it's supposed to work... some browsers DO do it by
default, but pressing "back" in a browser is supposed to show you what was
on the page last time you looked at it -- in other words, the page isn't
supposed to be re-requested from the server.

I *think* you might be able to force such behaviour with something
client-side like JavaScript, but you'll have to ask the appropriate list(s).

Justin

attached mail follows:


> > Hi,
> > I want to reload a page each time it is reached by pressing "back"
> > button.

If you want to refresh the page (aka click 'refresh') you can add:

<META HTTP-EQUIV="refresh" CONTENT="X;<?php echo $_SERVER['PHP_SELF'];
?>">

To your HTML document between the <HEAD> tags. the X represents the
number of seconds before the refresh occurs.

If you want to actually go back a page, you'll need to go lookup the
method on a Javascript site. I believe 'history.back()' might work as
the method call, but don't quote me on that.

John

--
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
John Coggeshall
john at coggeshall dot org http://www.coggeshall.org/
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-

attached mail follows:


Can somebody help me with extracting public key from certificate and use it
as a variable. All functions are returning resources and there is no way to
get everything parsed.

thanks in advance
ro6avia

attached mail follows:


John,

Thanks for responding. No, I don't really need to write it to the
filesystem - it's just that that's the only way I could think of doing it.
Displaying as a streamed image seems a sensible solution - but this and
serializing are new to me (though I was aware of them). Anyway, after a bit
of grappling with the manual I've got something working. FYI, this is what
I'm doing...

I've created a file called dept-img.php which contains:

<?php
header("Content-type: image/jpeg");
$deptcode=array();
$deptcode=unserialize(stripslashes($_GET['codes']));
$backimg = imagecreatefrompng('deptmaps/bckgrnd.png');
foreach ($deptcode as $dkey => $dval) {
    if ( file_exists("deptmaps/".$deptcode[$dkey].".png")) {
     $overlay = imageCreateFromPNG("deptmaps/".$deptcode[$dkey].".png");
      imageCopyMerge($backimg,$overlay,0,0,0,0,350,394,100);
 }
}
imagejpeg($backimg);
?>

That's the whole file. And I'm calling this with:

<?php $ser_codes = serialize($deptcode); ?>
<IMG SRC='dept-img.php?codes=<?php echo $ser_codes ?>' >

($deptcode is an array of two-character strings)

Like I say, it seems to be working, though if anyone can see an obvious snag
with this code I'm always open to constructive criticism. And thanks again
for putting me on the right track.

a+

Steve

"John Coggeshall" <johncoggeshall.org> wrote in message
news:1052780768.17713.5.camelcoogle.localdomain...
> > I'd appreciate any thoughts on this... James earlier suggested making
the
> > IMG SRC refer to a separate script that does the image creation, but
that
> > means passing the array to that script, and I'm not sure how to do that.
>
> You can serialize the array and pass it:
>
> http://www.php.net/manual/en/function.serialize.php
>
> Does the image need to be written to the file system?? If it doesn't,
> why not just display it as a streamed image. If you still have caching
> problems then you can always send some HTTP headers to inform the
> browser to not cache the image.
>
> John
>
> --
> -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
> John Coggeshall
> john at coggeshall dot org http://www.coggeshall.org/
> -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-

attached mail follows:


Dear all,

I am, in my PHP script fcheck1.php writing to an HTML file.
This HTML page has a hyperlink 'email' which should open
up another form.
I am attaching the code.
What the code does is:it writes to the HTML file and posts the
data to the next form which creates an html page of similar
kind.

what i want is: when the user clicks on the 'email link'
a form should open which should be able to access the $wname
value.

but i don't know how can i post this data to the html form
because in fcheck1.php i already have a submit button that posts
this data to another form.

please help.

thanks a lot.
regards,
diksha.

THE CODE "fcheck1.php" is as under:

<?php

//this will retrive the background and logo images.
echo"<input type=\"hidden\" name=\"path\" value=\"$path\">";
echo"<input type=\"hidden\" name=\"pathlogo\"
value=\"$pathlogo\">";

$fn = "$wname.html";
$fp = fopen ($fn, "w");

$string='<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Address</title>
<style type="text/css">
table { font-family:';
$string.=$ffamily;
$string.='; font-style:';
$string.=$fstyle;
$string.='}
</style>
</head>
<body background="'.$path.'">

<table border="1" width="100%" height="430">
   <tr>
     <td width="100%" colspan="2" height="61"><img
src="'.$pathlogo.'" align=left height=60 width=75><center><font
size=23><u>';
   $string.=$wname;
   $string.='</u></font></center></td>
   </tr>
   <tr>
     <td width="24%" height="19"> </td>
     <td width="76%" height="19"><marquee behaviour=slide
align="middle"> this site is made by
businessdirectoryofindia.com</marquee></td>
   </tr>
   <tr>
     <td width="24%" height="19"><a
href="http://192.168.0.1/bdoi_change/';
     $string.=$wname;
     $string.='_page1.html">';
     $string.=$link1;
     $string.='</a></td>
     <td valign=top width="76%" height="324" rowspan="14"><br>';
   $string.=$descriphome;
   $string.='</td>
   </tr>
   <tr>
     <td width="24%" height="19"><a
href="http://192.168.0.1/bdoi_change/';
    $string.=$wname;
    $string.='_page2.html">';
    $string.=$link2;
    $string.='</a></td>
   </tr>
   <tr>
     <td width="24%" height="19"><a
href="http://192.168.0.1/bdoi_change/';
    $string.=$wname;
    $string.='_page3.html">';
    $string.=$link3;
    $string.='</a></td>
   </tr>
   <tr>
     <td width="24%" height="19"><a
href="http://192.168.0.1/bdoi_change/';
    $string.=$wname;
    $string.='_page4.html">';
    $string.=$link4;
    $string.='</a></td>
   </tr>
   <tr>
     <td width="24%" height="19"></td>
   </tr>
   <tr>
     <td width="24%" height="19">
       <p align="center"><b>Address</b></td>
   </tr>
   <tr>
     <td width="24%" height="76"><center>';
   $string.=$badd1;
   $string.=',';
   $string.=$area;
   $string.='<br>';
   $string.=$city;
   $string.='<br>';
   $string.=$state;
   $string.='</center></td>
   </tr>
   <tr>
     <td width="24%" height="19"></td>
   </tr>
   <tr>
     <td width="24%" height="19">
       <p align="center"><b>Telephone no.</b></td>
   </tr>
   <tr>
     <td width="24%" height="19"><center>';
   $string.=$btel;
   $string.='</center></td>
   </tr>
   <tr>
     <td width="24%" height="19"></td>
   </tr>
   <tr>
     <td width="24%" height="19"><p align="center">
      <b>Fax</b></td>
   </tr>
   <tr>
     <td width="24%" height="19"><center>';
   $string.=$bfax;
   $string.='</center></td>
   </tr>
   <tr>
     <td width="24%" height="19"></td>
   </tr>
   <tr>
     <td width="24%" height="19"><p align="center">
      <a href="http://192.168.0.1/bdoi_change/sendemail.php';
      $string.='">Email</a></td>
     <td width="76%" height="19"><center>

</a>
     </td>
   </tr>
</table>

</body>

</html>';

$contents=fputs($fp, $string);
echo "'$contents'";
fclose($fp);

?>

<html>
<head>
<title>
</title>
</head>
</body>
<?php

echo"<form method=get action=\"2f.php\">
<input type=\"hidden\" name=path value=\"$path\">
<input type=\"hidden\" name=pathlogo value=\"$pathlogo\">
<input type=\"hidden\" name=login value=\"$login\">
<input type=\"hidden\" name=yname value=\"$yname\">
<input type=\"hidden\" name=cname value=\"$cname\">
<input type=\"hidden\" name=cat value=\"$cat\">
<input type=\"hidden\" name=pbus value=\"$pbus\">
<input type=\"hidden\" name=btel value=\"$btel\">
<input type=\"hidden\" name=bfax value=\"$bfax\">
<input type=\"hidden\" name=bemail value=\"$bemail\">
<input type=\"hidden\" name=badd1 value=\"$badd1\">
<input type=\"hidden\" name=area value=\"$area\">
<input type=\"hidden\" name=city value=\"$city\">
<input type=\"hidden\" name=state value=\"$state\">
<input type=\"hidden\" name=pin value=\"$pin\">
<input type=\"hidden\" name=wname value=\"$wname\">
<input type=\"hidden\" name=ffamily value=\"$ffamily\">
<input type=\"hidden\" name=fstyle value=\"$fstyle\">

<input type=\"hidden\" name=\"link2\" value=\"$link2\">
<input type=\"hidden\" name=\"link3\" value=\"$link3\">
<input type=\"hidden\" name=\"link4\" value=\"$link4\">

<textarea name=\"descriphome\" value=\"hidden\" rows=5
cols=60>$descriphome</textarea>

<pre>
<h2>Create first page</h2>
First link name: <input type=\"text\" name=\"link1\"
value=\"$link1\">
<br>
Enter the description of the first page:
<textarea name=descrip1 rows=5 cols=60 >$descrip1</textarea>
<br>
<input type=\"submit\" value=\"submit\">
</form>";

?>

</body>
</html>

___________________________________________________
Get email that means BUSINESS! me mycompany.com.
Just Rs.1499/year.
To start, click http://www.rediffmailpro.com

attached mail follows:


I hope I understood your question right.

A way to send the variable to the next page is adding the var to the
querystring.
like: whatever.php?wname=value
would that help?

greets,
tim

Diksha Neel <diksha_neelrediffmail.com> schrieb in im Newsbeitrag:
20030513091220.10613.qmailwebmail18.rediffmail.com...
> Dear all,
>
> I am, in my PHP script fcheck1.php writing to an HTML file.
> This HTML page has a hyperlink 'email' which should open
> up another form.
> I am attaching the code.
> What the code does is:it writes to the HTML file and posts the
> data to the next form which creates an html page of similar
> kind.
>
> what i want is: when the user clicks on the 'email link'
> a form should open which should be able to access the $wname
> value.
>
> but i don't know how can i post this data to the html form
> because in fcheck1.php i already have a submit button that posts
> this data to another form.
>
> please help.
>
> thanks a lot.
> regards,
> diksha.
>
> THE CODE "fcheck1.php" is as under:
>
>
> <?php
>
> file://this will retrive the background and logo images.
> echo"<input type=\"hidden\" name=\"path\" value=\"$path\">";
> echo"<input type=\"hidden\" name=\"pathlogo\"
> value=\"$pathlogo\">";
>
>
> $fn = "$wname.html";
> $fp = fopen ($fn, "w");
>
> $string='<html>
>
> <head>
> <meta http-equiv="Content-Language" content="en-us">
> <meta http-equiv="Content-Type" content="text/html;
> charset=windows-1252">
> <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
> <meta name="ProgId" content="FrontPage.Editor.Document">
> <title>Address</title>
> <style type="text/css">
> table { font-family:';
> $string.=$ffamily;
> $string.='; font-style:';
> $string.=$fstyle;
> $string.='}
> </style>
> </head>
> <body background="'.$path.'">
>
> <table border="1" width="100%" height="430">
> <tr>
> <td width="100%" colspan="2" height="61"><img
> src="'.$pathlogo.'" align=left height=60 width=75><center><font
> size=23><u>';
> $string.=$wname;
> $string.='</u></font></center></td>
> </tr>
> <tr>
> <td width="24%" height="19"> </td>
> <td width="76%" height="19"><marquee behaviour=slide
> align="middle"> this site is made by
> businessdirectoryofindia.com</marquee></td>
> </tr>
> <tr>
> <td width="24%" height="19"><a
> href="http://192.168.0.1/bdoi_change/';
> $string.=$wname;
> $string.='_page1.html">';
> $string.=$link1;
> $string.='</a></td>
> <td valign=top width="76%" height="324" rowspan="14"><br>';
> $string.=$descriphome;
> $string.='</td>
> </tr>
> <tr>
> <td width="24%" height="19"><a
> href="http://192.168.0.1/bdoi_change/';
> $string.=$wname;
> $string.='_page2.html">';
> $string.=$link2;
> $string.='</a></td>
> </tr>
> <tr>
> <td width="24%" height="19"><a
> href="http://192.168.0.1/bdoi_change/';
> $string.=$wname;
> $string.='_page3.html">';
> $string.=$link3;
> $string.='</a></td>
> </tr>
> <tr>
> <td width="24%" height="19"><a
> href="http://192.168.0.1/bdoi_change/';
> $string.=$wname;
> $string.='_page4.html">';
> $string.=$link4;
> $string.='</a></td>
> </tr>
> <tr>
> <td width="24%" height="19"></td>
> </tr>
> <tr>
> <td width="24%" height="19">
> <p align="center"><b>Address</b></td>
> </tr>
> <tr>
> <td width="24%" height="76"><center>';
> $string.=$badd1;
> $string.=',';
> $string.=$area;
> $string.='<br>';
> $string.=$city;
> $string.='<br>';
> $string.=$state;
> $string.='</center></td>
> </tr>
> <tr>
> <td width="24%" height="19"></td>
> </tr>
> <tr>
> <td width="24%" height="19">
> <p align="center"><b>Telephone no.</b></td>
> </tr>
> <tr>
> <td width="24%" height="19"><center>';
> $string.=$btel;
> $string.='</center></td>
> </tr>
> <tr>
> <td width="24%" height="19"></td>
> </tr>
> <tr>
> <td width="24%" height="19"><p align="center">
> <b>Fax</b></td>
> </tr>
> <tr>
> <td width="24%" height="19"><center>';
> $string.=$bfax;
> $string.='</center></td>
> </tr>
> <tr>
> <td width="24%" height="19"></td>
> </tr>
> <tr>
> <td width="24%" height="19"><p align="center">
> <a href="http://192.168.0.1/bdoi_change/sendemail.php';
> $string.='">Email</a></td>
> <td width="76%" height="19"><center>
>
> </a>
> </td>
> </tr>
> </table>
>
> </body>
>
> </html>';
>
>
> $contents=fputs($fp, $string);
> echo "'$contents'";
> fclose($fp);
>
> ?>
>
> <html>
> <head>
> <title>
> </title>
> </head>
> </body>
> <?php
>
> echo"<form method=get action=\"2f.php\">
> <input type=\"hidden\" name=path value=\"$path\">
> <input type=\"hidden\" name=pathlogo value=\"$pathlogo\">
> <input type=\"hidden\" name=login value=\"$login\">
> <input type=\"hidden\" name=yname value=\"$yname\">
> <input type=\"hidden\" name=cname value=\"$cname\">
> <input type=\"hidden\" name=cat value=\"$cat\">
> <input type=\"hidden\" name=pbus value=\"$pbus\">
> <input type=\"hidden\" name=btel value=\"$btel\">
> <input type=\"hidden\" name=bfax value=\"$bfax\">
> <input type=\"hidden\" name=bemail value=\"$bemail\">
> <input type=\"hidden\" name=badd1 value=\"$badd1\">
> <input type=\"hidden\" name=area value=\"$area\">
> <input type=\"hidden\" name=city value=\"$city\">
> <input type=\"hidden\" name=state value=\"$state\">
> <input type=\"hidden\" name=pin value=\"$pin\">
> <input type=\"hidden\" name=wname value=\"$wname\">
> <input type=\"hidden\" name=ffamily value=\"$ffamily\">
> <input type=\"hidden\" name=fstyle value=\"$fstyle\">
>
> <input type=\"hidden\" name=\"link2\" value=\"$link2\">
> <input type=\"hidden\" name=\"link3\" value=\"$link3\">
> <input type=\"hidden\" name=\"link4\" value=\"$link4\">
>
> <textarea name=\"descriphome\" value=\"hidden\" rows=5
> cols=60>$descriphome</textarea>
>
> <pre>
> <h2>Create first page</h2>
> First link name: <input type=\"text\" name=\"link1\"
> value=\"$link1\">
> <br>
> Enter the description of the first page:
> <textarea name=descrip1 rows=5 cols=60 >$descrip1</textarea>
> <br>
> <input type=\"submit\" value=\"submit\">
> </form>";
>
> ?>
>
> </body>
> </html>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ___________________________________________________
> Get email that means BUSINESS! me mycompany.com.
> Just Rs.1499/year.
> To start, click http://www.rediffmailpro.com
>

attached mail follows:


Hi,

Is there any function which can convert an UTF-8 char to UTF-16 format?

for example:
UTF-8: E6 B8 AC => UTF-16: 6E2C (Decimal: 28204)

test it from:
http://www.unicode.org/cgi-bin/GetUnihanData.pl?codepoint=6E2C

But I don't know how it goes...

Thanks,
Sepho

attached mail follows:


Hi,

When i use the mail funtion I cannot seem to insert line breaks with the
<br> tag, is there another way to do this?

attached mail follows:


\n forces a new line.

> Hi,
>
> When i use the mail funtion I cannot seem to insert line breaks with
> the <br> tag, is there another way to do this?
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

Randum Ian
ianrandumian.co.uk
DancePortalGlobal Webmaster
http://www.danceportalglobal.com

attached mail follows:


The process is reversible, so you don't loose the freedom.

Leif K-Brooks wrote:

> No, use it when you display data in an HTML page. That way, you don't
> lose the freedom to display the DB data in other formats.
>
> Marek Kilimajer wrote:
>
>> Use htmlspecialchars only when you insert into db, this will not make
>> a significant difference.
>>
>> Ryan A wrote:
>>
>>> Hey there,
>>> Thanks for replying.
>>>
>>> So many htmlspecialchars($string)'s, wont it make my scripts slower?
>>> I just want to know if it will make my script very slow and put a
>>> lot of
>>> pressure on processing in the long run or it normal...
>>>
>>> Cheers,
>>> -Ryan
>>>
>>>
>>>
>>>
>>>> Use htmlspecialchars, not only for breaking your neat design, but for
>>>> security. Someone might insert javascript and steal your cookies or
>>>>
>>>
>>>
>>> session.
>>>
>>>
>>>> Ryan A wrote:
>>>>
>>>>
>>>>
>>>>> Hi,
>>>>> I am programming for a webhosting directory site (to be) and we
>>>>> have some
>>>>> really huge forms...with as much as 45 fields in a single form and
>>>>> quite
>>>>>
>>>>
>>>>
>>> a
>>>
>>>
>>>>> few text/hidden boxes, multiply that by around 5-10 forms....
>>>>>
>>>>> As you can imagine I dont want some jackass spoiling my neat
>>>>> tables by
>>>>> entering <h1> hahaha got you</h1> into it...so would you suggest I
>>>>> use
>>>>> HTMLSPECIALCHARS or STRIP_TAGS to do it?
>>>>>
>>>>> If I use either, will it slow down the rate of execution noticably?
>>>>> I am kind of leaning towards HTMLSPECIALCHARS as if someones name is
>>>>>
>>>>> Ryan 'O Conner
>>>>>
>>>>> it will happily take care of the " ' " there or if he accidentally
>>>>> puts
>>>>>
>>>>> Ryan "O Conner
>>>>>
>>>>> it will replace that with too...no need of the addslashes/strip
>>>>> slashes
>>>>> thing.
>>>>>
>>>>> Any experience with this and what do you suggest?
>>>>>
>>>>> Kindly reply.
>>>>>
>>>>> Cheers,
>>>>> -Ryan
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> PHP General Mailing List (http://www.php.net/)
>>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>>
>>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>