RE: [PHP-DB] Concatenate two strings

2003-01-16 Thread Richard Allinson
Mine is as follows

$valor = $valor1.$valor2;
or
$valor = $valor1$valor2;

-Original Message-
From: Fred Wright [mailto:[EMAIL PROTECTED]] 
Sent: 16 January 2003 11:54
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Concatenate two strings


On mine its just
$valor1$valor2

Mark Snijders [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
it.c
om...
 with a dot

 $valor=$valor1 .   . $valor2

 :-)





 -Original Message-
 From: Bruno Pereira [mailto:[EMAIL PROTECTED]]
 Sent: woensdag 15 januari 2003 15:48
 Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: [PHP-DB] Concatenate two strings


 How can i join two strings.
 My code is something like:
 $valor1=bruno;
 $valor2=Pereira;
 $valor=$valor1 +   + $valor2

 Can someone help me. Thanks.

 Cumprimentos

 Bruno Pereira
 [EMAIL PROTECTED]


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





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


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




RE: [PHP-DB] Slashed being added..

2003-01-15 Thread Richard Allinson
stripcslashes (string str)

Ric

-Original Message-
From: Aaron Wolski [mailto:[EMAIL PROTECTED]] 
Sent: 15 January 2003 16:38
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Slashed being added..


Hi All..
 
Quick q here as I cannot remember how to prevent this.
 
Customer is entering their name in a form that get submitted.
 
Their name is: Mike O'Neill
 
But their name is being entered like: Mike O\\\'Neill
 
This is causing his info not to be saved. How do I prevent this?
 
Any thoughts?
 
Thanks!
 
Aaron 
 

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




RE: [PHP-DB] Re: Flat File Upload..HELP!

2003-01-06 Thread Richard Allinson
Check your files size resriction. It seems the file is not even leaving
the client.

input type=hidden name=MAX_FILE_SIZE value= 1000


1000 = 1K

Ric

J . Keith Tew wrote:


 I know this is not technically a DB question but thought someone may 
 be able to help with this. I have tried everything I could think of 
 to make this script work but I keep getting the error message below. 
 I've even changed the permissions on the files and the folders 
 affected to  allow full read,write execute priviledges to all users 
 ...but still no luck. I'm not sure if it is a server (apache on 
 linux)  permission issue or if it is a typo in the script or a file 
 path issue. ANY HELP would be greatly appreciated.  I've also 
 included the script below in the event the mistake is in the script


 Thanks in Advance

 ERROR MESSAGE

 Uploading file...

 Warning: Unable to create
 '/home/design/public_html/uploads/fbcnews.txt': Permission denied in 
 /home/design/public_html/uploads/upload1.php on line 35
 Problem: Could not move file into directory


 UPLOAD SCRIPT

 htm
 head
titleUploading.../title
 /head
 body
 h1Uploading file.../h1
 ?
// $userfile is where file went on webserver
// $userfile_name is original file name
// $userfile_size is size in bytes
// $userfile_type is mime type e.g. image/gif

 /*  echo Variables are:br;
echo $userfile. .$userfile_name. .$userfile_size. 
 .$userfile_type.br; */

if ($userfile==none)
{
  echo Problem: no file uploaded;
  exit;
}

if ($userfile_size==0)
{
  echo Problem: uploaded file is zero length;
  exit;
}

if ($userfile_type != text/plain)
{
  echo Problem: file is not plain text;
  exit;
}

$upfile = /home/design/public_html/uploads/.$userfile_name;

if ( !copy($userfile, $upfile))
{
  echo Problem: Could not move file into directory;
  exit;
}


echo File uploaded successfullybrbr;
$fp = fopen($upfile, r);
$contents = fread ($fp, filesize ($upfile));
fclose ($fp);

$contents = strip_tags($contents);
$fp = fopen($upfile, w);
fwrite($fp, $contents);
fclose($fp);

echo Preview of uploaded file contents:brhr;
echo $contents;
echo brhr;

 ?
 /body
 /html


 


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


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