[PHP] TextArea vs. URLEncode/URLDecode/quotes

2003-07-09 Thread Arcadius A.
Hello!
I have a form with a textarea...
When the user submits the form, I validate the form on another page.. and in
case the data are not valid,
 I redirect the user back to the form, passing all the info filled in
previously in the URL, then I easily display the values  in the form
again For textarea, I use :
urlencode($textarea_value)  to pass the text in the URL for the validating
page.

And in the textarea, to get back the info, I do:
 textarea?=urldecode($_GET['textarea_value'])?/textarea

This works fine as far as there is no quote in the text

In case there are quotes in the text, quotes are escaped :-( so I get in
the textarea slashes just before the quotes and stripslashes doesn't
seem to help...

So, My question is: What's the best way to get the value of a textarea back
after validation without using session?

Thanks.

Arcadius Ahouansou.



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



Re: [PHP] TextArea vs. URLEncode/URLDecode/quotes

2003-07-09 Thread Arcadius A.

Marek Kilimajer [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 The correct way is:
 In validate.php:
 if(error) {
 if(magic_quotes) stripslashes();
 urlencode();
 } else {
 INSERT INTO ...
 }

 In form.php:
 // urldecode() is not needed, GET variables are already decoded
 if(magic_quotes) stripslashes();
 textarea?= htmlspecialchars()?/textarea



Thanks!!! :-)



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



[PHP] Re: cheap PHP+SQL WebHosting

2003-06-01 Thread Arcadius A.
Thanks!

Arcadius.

Nabil [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 www.spiderhosts.com

 i'v been for so long with them, and the service is good
 Nabil
 www.cabms.org
 www.d2ue.com


 Arcadius A. [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  Hello!
  Please, do you know of any cheap PHP+SQL web hosting company?
 
  I know we always get what we pay for, but I really need somethingk
cheap.
 
  Thanks in advance.
 
  Arcadius.
 
 





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



[PHP] Re: Who can tell me how I can get the client's hostname by php?

2002-11-22 Thread Arcadius A.

Joskey Liaus [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
 Thank you for reading my mail!
 --
 Who can tell me how I can get the client's hostname by php?
 --
Joskey Liaus
[EMAIL PROTECTED]



You may need to have a look at:
http://www.php.net/manual/en/function.gethostbyaddr.php

Arcadius.



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




[PHP] GD lib. image quality!

2002-08-25 Thread Arcadius A.

Hello!
I wrote a little script for generation thumbnails of larger images
code
$origImage = imageCreateFromJpeg($sourcePath./.$currentImageName);
$thumbnail = imageCreate($thumbWidth,$thumbHeight);// create empty image

imageCopyResized($thumbnail,$origImage,0,0,0,0,$thumbWidth,$thumbHeight,imag
esX($origImage),imagesY($origImage));
imageJpeg($thumbnail, $targetPath./.$thumbNamePrefix._thumb.jpg); //
Store it
imageDestroy($thumbnail); // cleanup
echo brImage .$targetPath./.$thumbNamePrefix._thumb.jpg.
created successfully!;

/code

then, I've noticed that the quality of the thumbnails created is very bad!
my phpinfo() page shows  2.0 or higher as GD version

So, I'm wondering whether I'm doing something wrong in my code or whether
there exist a better library to use with PHP ... a library able to generate
good quality JPG files...

Thanks in advance.

Arcadius.




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




[PHP] Re: problem with using link variables

2002-08-25 Thread Arcadius A.

See the URL functions at http://www.php.net/manual/en/ref.url.php
IMHO, you'd  need some encoding

Arcadius


Ivan Carey [EMAIL PROTECTED] wrote in message
006b01c24c2f$8d291950$0201a8c0@ivan">news:006b01c24c2f$8d291950$0201a8c0@ivan...
Hello,
I am sending variables via a link to another page eg. a
href=\agencydet.php?provnum=$provservid\$provservdesc/a

If the variable provnum contains text such as: hello  there

Then only the word hello is passed on to agencydet.php.

I have tried using htmlspecialchars and htmlentities but still I have the
same problem.

What I am trying to achieve is to be able to display hello  there on the
agencydet.php page when it is shown in the browser.

Thanks,
Ivan




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




[PHP] Writing Cross DB application

2002-04-15 Thread Arcadius A.


Hello !
I'm planning to write a database application for  MySQL, and then port it to
PostrgeSQL.
Is there any library or class that could help me to write/maintain just one
source code for both MySQL and PostgreSQL (on WIN and UNIX)?

Thanks in advance.

ARcadius



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




[PHP] Re: Happy new year!

2001-12-31 Thread Arcadius A.

Thanks ! :-)


--
 ---
 Student Arcadius Ahouansou
  ICQ# : 37119073
  http://arcadnet.net/

George Nicolae [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 A happy new year with a lot of dynamic sites to all php community!

 --


 Best regards,
 George Nicolae
 IT Manager
 ___
 X-Playin - Professional Web Design
 www.x-playin.f2s.com








-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Prev ... Next

2001-12-24 Thread Arcadius A.

http://www.onlamp.com/pub/a/php/2000/11/02/next_previous.html

Arcadius



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] relative path vs. INCLUDE() !!!!!

2001-12-24 Thread Arcadius A.

Hello !
I've just made a nice navavigation  bar for my website 
The nav. bar is  a php file (Templates/inc_nav.php)containing links to other
pages of my site. the links has been made relatively to the file
inc_nav.php;
Now that I've included the inc_nav.php in other pages , my links no longer
work ... it seems that PHP just copy the content of the nav bar into other
pages so , links are now relavite to the current page and this of course
doean't work !!! :-(((
Is there any workaround or any othe way  to include a nav bar in PHP without
breaking the links ?
I hope you understand what I mean ...

Thanks

Arcad.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Detecting Languages...

2001-10-31 Thread Arcadius A.

HEllo !
I have a website designed in several languages (En , Fr , Cz) 
My question is :
How to detect the language setting of the the visitor's PC  in order to
redirect him to a specified content ?

Thanks ...

Arcad.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Showing up variables in URL !

2001-09-18 Thread Arcadius A.

Hello !
We all know how to pass value to variable using an URL.
So, how can I do the inverse ?
I mean , showing the value of a variable in the URL?

for instance  my page index.php is :

?
$greetings=Hello ;
echo $greetings ;
 ?

So, how to make PHP so that when I load my page in the browser(typing
index.php in the adress bar) , it will print not only hello on the
page,but also show index.php?greetings=hello   as URL  , So , I
basically want PHP to dynamically append  ?greetings=?=$greetings?  to
the URL I've typed

How to do this ?
I hope I've made myself understood ... :o)

Thanks...

Arcad.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP_SELF or REQUEST_URI within Function ?

2001-08-31 Thread Arcadius A.

Thanks  Jack 

arcad.

Jack Dempsey [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 you have to use $GLOBALS[SCRIPT_FILENAME]

 jack

 Arcadius A. wrote:

  Hello !
  Why this script   prints an empty string(it prints nothing) as the
value of
  the variable u ?
  This happens even if  $REQUEST_URI or PHP_SELF is used instead of
  SCRIPT_FILENAME .
  Thanks...
 
  ?
  function menu( $theurl)
  {
  //global $u ;
  $u = $SCRIPT_FILENAME;
  echo $u;
  echo $theurl;
  }
  ?
 
  Hello there !!!
 
  ? menu(hoho.com) ?
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP_SELF or REQUEST_URI within Function ?

2001-08-31 Thread Arcadius A.

RE: [PHP] PHP_SELF or REQUEST_URI within Function ?Ok Men !!!. Now I see  
thanks alot for the inputs ! :o))

Arcad


  - Original Message - 
  From: Boget, Chris 
  To: 'Alexander Skwar' 
  Cc: Arcadius A. ; [EMAIL PROTECTED] 
  Sent: Friday, August 31, 2001 8:22 AM
  Subject: RE: [PHP] PHP_SELF or REQUEST_URI within Function ?


Or, so you don't have to specify all the variables you are using 
as globals (especially if you are using *alot* of them), you can 
use: 
$GLOBALS[SCRIPT_FILENAME]; 
   What's the gain?  'global ' has 7 characters, whereas '$GLOBALS[]' has 
   10 characters.  So, you don't type less.  And with using global(), the 
   code is more orderly, and thus easier to read. 

  True.  But take the following function: 

  function processLotsOfFormVars() { 
global $fieldOne, $fieldTwo, $fieldThree, $fieldFour; 
global $fieldFive, $fieldSix, $fieldSeven; 
global $PHP_SELF, $REQUEST_URI; 
global $HTTP_REFERER; 

echo Field One is: $fieldOnebr\n; 
echo Field Two is: $fieldTwobr\n; 
  // etc 
  } 

  OR you can do it this way: 

  function processLotsOfFormVars() { 
echo Field One is: $GLOBALS[fieldOne]br\n; 
echo Field Two is: $GLOBALS[fieldTwo]br\n; 
  // etc 
  } 

  I've done it both ways.  I'm not advocating using 
  $GLOBALS[var_name]; over global $var_name, 
  just that it is an alternative if you are using alot of global 
  variables in a function.  Plus, if the function gets large, 
  it's easier to see where the value is coming from by using 
  the $GLOBALS variable. 
  That's all I was saying. 

  Chris 




Re: [PHP] PHP_SELF or REQUEST_URI within Function ?

2001-08-31 Thread Arcadius A.

Cool ...
Now that we're talking about PHP 
I'd like to ask a question 
You know the overloading function in C++  Is that possible in PHP ?

Basically , I'd like to define  more than one function having the same name
but different number of variables/parameters ... so PHP would know which one
I'm calling depending on the numbwer/type of the variables ...
exemple :

?
function arcad_func( $var_a )
{
echo $vara ;
}
;
function arcad_func( $var_a , $var_b )
{
echo $vara  . $var_b ;
}
?

?
arcad_func(Hello!);
arcad_func(Hello , World!)
?

Would this work ?

Thanks...

- Original Message -
From: Alexander Skwar [EMAIL PROTECTED]
To: Boget, Chris [EMAIL PROTECTED]
Cc: Arcadius A. [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, August 31, 2001 8:21 AM
Subject: Re: [PHP] PHP_SELF or REQUEST_URI within Function ?


 So sprach »Boget, Chris« am 2001-08-31 um 10:22:28 -0500 :
  True.  But take the following function:
 
  function processLotsOfFormVars() {
global $fieldOne, $fieldTwo, $fieldThree, $fieldFour;
global $fieldFive, $fieldSix, $fieldSeven;
global $PHP_SELF, $REQUEST_URI;
global $HTTP_REFERER;
 
echo Field One is: $fieldOnebr\n;
echo Field Two is: $fieldTwobr\n;
  // etc
  }
 
  OR you can do it this way:
 
  function processLotsOfFormVars() {
echo Field One is: $GLOBALS[fieldOne]br\n;
echo Field Two is: $GLOBALS[fieldTwo]br\n;
  // etc
  }

 Uh?  I don't see it.  The matching function 1 is:

 function processLotsOfFormVars() {
 global $fieldOne;
 global $fieldTwo;

 echo Field One is: $fieldOnebr\n;
 echo Field Two is: $fieldTwobr\n;
 }

 this quite doesn't look as intimidating as the piece you wrote.  And
 even if there are 10 lines of 'global', I still like it a lot better,
 because it CLEARLY shows which form vars are going to be used.

 One of the downside of PHP IMHO is, that you do not have to define
 variables.  This leads to a lot of errors.  At least there should be a
 option, which forces you to define variables, like maybe so:

 dim $some_var;

 this leads to easier readable code IMHO.

  variables in a function.  Plus, if the function gets large,
  it's easier to see where the value is coming from by using
  the $GLOBALS variable.

 Now, that's the point I'm arguing here.  I don't think so.

 Alexander Skwar
 --
 How to quote: http://learn.to/quote (german) http://quote.6x.to (english)
 Homepage: http://www.digitalprojects.com   |   http://www.iso-top.de
iso-top.de - Die günstige Art an Linux Distributionen zu kommen
 Uptime: 2 days 2 hours 10 minutes



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP_SELF or REQUEST_URI within Function ?

2001-08-31 Thread Arcadius A.

Ok .I see Thanks to you both !
Have a nice weekend 
Arcad


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP_SELF or REQUEST_URI within Function ?

2001-08-30 Thread Arcadius A.

Hello !
Why this script   prints an empty string(it prints nothing) as the  value of
the variable u ?
This happens even if  $REQUEST_URI or PHP_SELF is used instead of
SCRIPT_FILENAME .
Thanks...

?
function menu( $theurl)
{
//global $u ;
$u = $SCRIPT_FILENAME;
echo $u;
echo $theurl;
}
?

Hello there !!!

? menu(hoho.com) ?




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Advanced Form Processing HELP

2001-08-22 Thread Arcadius A.

Hello !
I have a simple form (feedback.php) that could allow users to send me
seedbacks... the form is processed(email is sent ) by the script
confirm.php.
My question is :
How could i make the values filled in the  form  remain unchanged even after
the user click on  the browser Refresh/Reload button without submittingf
the form ?
So , I would like the user not to loose the data he has  filled in the form
...even after a realod
My idea is to pass the vulues of  $smane , $smail etc in the URL  during the
reload.. but I still don't know how to get it done ...

Here is may feedback.php

form method=post action=confirm.php
  input type=text  NAME=sname value=?echo $sname? 
  br
   E-Mail: input type=text NAME=smail value=?echo
$smail?
  br

To: input type=text NAME=rname value=?echo $rname?

  br
  message:TEXTAREA NAME=message WRAP=VIRTUAL ROWS=4
cols=60 value=? echo $message? /TEXTAREA
 br
 input type=submit value=Send
   /form

Thanks in advance ...

Arcad.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Host OnLine ?

2001-08-06 Thread Arcadius A.

Hello !
Is there any function in PHP returning true or false  or something similar
when a given host is online or not ?

Basically , I'm in need od  something ping 
Thanks ...

Arcad



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Host OnLine ?

2001-08-06 Thread Arcadius A.

What if the host I'm checking is a simple workstation not running neither a
HTTP  nor a FTP server ?
I'm writing this script for an intranet to check which machines are
currently on ...

Thanks 

Arcad

Arcadius A. [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hello !
 Is there any function in PHP returning true or false  or something similar
 when a given host is online or not ?

 Basically , I'm in need od  something ping 
 Thanks ...

 Arcad







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: syntax help~~~

2001-08-05 Thread Arcadius A.

Hello !
We could keep things simpler ...
Why not  give a try to this ?:

$watchlist_query = mysql_query( Create Table $temp ( WId int Not
Nullauto_increment, QId int not null, Primary Key (WId) ) )  or die (Error
! Cannot  create table ! . mysql_error() );

Hope it would work :o)

(At least the  mysql_error() would show you the  error code )

Arcad


Coconut Ming [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi
   I am having the problem in the coding below

 ?

 mysql_connect('localhost','123','123') or die (Unable to connect to SQL
 Server);
 mysql_select_db('Helpwatch') or die (Unable to select database);

 $temp = $username.watch;
 $watchlist_query = mysql_query(Create Table $temp(WId int Not Null
 auto_increment, QId int not null, Primary Key (WId)););
 ?

 So.. in the above coding. I need to create a table. The table name
 should be a user-define name + watch
 I acquire the $username correctly and the variable $temp is working fine
 when I try to echo the value of it.
 Just say. I enter my username as coconut so I wish the mysql query to
 create a table called coconutwatch
 but I can't do that.. Because of the syntax error, the coding I have
 underline is where the parser told me that is an error there.
 I have playing around with it for 2 hours and more... but I cant solve
 it.. Anyway help is greatly appreciated.
 Thanks in advance.

 Sincerely
 Kok Ming




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Free PHP/MySQL Web Hosting ?

2001-08-04 Thread Arcadius A.

Hello !
Is there any free PHP/MySQL  Web Hosting without add ? ... or ... at least ,
I could have the choice to choose  where to place their banner on my pages
?
Thanks...
Arcad.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Machine name???

2001-07-25 Thread Arcadius A.

Hi !
Have a look at  : http://php.net/manual/browse-errata.php?let=g
There's  a code that gives you the right host name ..

?php
 if (getenv(HTTP_X_FORWARDED_FOR)){
 $ip=getenv(HTTP_X_FORWARDED_FOR);
}
else {
$ip=getenv(REMOTE_ADDR);
 }
$host = gethostbyaddr($ip);
?

Arcad.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]