Page 1 of 1

Escape Chatacter

Posted: Tue Apr 18, 2006 10:39 am
by moiseszaragoza
Pimptastic | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


I am using a the define() function in php 

i have it set like :

Code: Select all

define('HEADING_TITLE', 'my title goes here');
but the problem is that i need to add a ' as part of one of my titles and i really fo not want to have to do

Code: Select all

define('HEADING_TITLE', 'my title' . " ' " .'goes here');
any ideas what can i do?

Thanks


Pimptastic | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Tue Apr 18, 2006 10:40 am
by s.dot
Use double quotes "my title go's here" or use a backslash to escape the quote 'my title go\'s here'

Posted: Tue Apr 18, 2006 10:42 am
by moiseszaragoza
thanks

I was trying the / and got errors

Posted: Tue Apr 18, 2006 11:07 am
by Oren
You can also do it using ' instead of the ' (single quote).

Rename File

Posted: Mon May 01, 2006 1:43 pm
by moiseszaragoza
[QUOTE=moiseszaragoza]I am using

Code: Select all

$uploaddir = "images/photo_contest/";
				//echo($uploaddir);
				$uploadfile = $uploaddir . basename($_FILES['userfile']['name']);

				# echo '<pre>';
				if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
				   echo "Thank you $customer_first_name for submittig your image ";
				   mail("MyEmail@domain.com", "$uploadfile was uploaded","$uploadfile was uploaded" );
				} else {
				   echo "<span class='commingSoon'> The File was not Uploaded\n </span>";
				
				}

But I want to rename the file as soon as it gets uploaded i know i should add something here

Code: Select all

if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
				   echo "Thank you $customer_first_name for submittig your image ";
                          # Rename code


can any one help me with the rename code[/QUOTE]