NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page [PHP] whats wrong here (easy one)

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search
5 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 01-29-2007, 04:24 PM THREAD STARTER               #1 (permalink)
NamePros Regular
 
w1ww's Avatar
Join Date: Oct 2006
Location: Mars.
Posts: 439
w1ww is a jewel in the roughw1ww is a jewel in the roughw1ww is a jewel in the rough
 



[PHP] whats wrong here (easy one)


Whats wrong here?:

PHP Code:
//array of invalid characters
  
$junk = array('.' ',' '/' '\' , '`' , ';' , '[' ,  ']' , '-', '_', '*', '&', '^', '%', '$', '#', '@', '!', '~', '+', '(', ')', '|', '{', '}', '<', '>', '?', ':', '"', '='); 
Error:

Quote:
Parse error: syntax error, unexpected '`', expecting ')'

????: NamePros.com http://www.namepros.com/programming/287808-php-whats-wrong-here-easy-one.html
Thank you
__________________
:notme:
w1ww is offline  
Old 01-29-2007, 04:42 PM   #2 (permalink)
NamePros Regular
 
randyhenson's Avatar
Join Date: Oct 2005
Location: Potosi, Mo
Posts: 334
randyhenson is a glorious beacon of lightrandyhenson is a glorious beacon of lightrandyhenson is a glorious beacon of lightrandyhenson is a glorious beacon of lightrandyhenson is a glorious beacon of light
 




Originally Posted by w1ww
Whats wrong here?:
????: NamePros.com http://www.namepros.com/showthread.php?t=287808

PHP Code:
//array of invalid characters
  
$junk = array('.' ',' '/' '\' , '`' , ';' , '[' ,  ']' , '-', '_', '*', '&', '^', '%', '$', '#', '@', '!', '~', '+', '(', ')', '|', '{', '}', '<', '>', '?', ':', '"', '='); 
Error:




Thank you
I don't know php but I think you have to escape special characters, So where you have '\' it should be '\\'. There are other special characters you have to escape but like I said I don't know PHP, So I don't know witch ones
randyhenson is offline  
Old 01-29-2007, 04:42 PM   #3 (permalink)
NamePros Regular
Join Date: Sep 2005
Location: Southern California
Posts: 371
martialtiger is a jewel in the roughmartialtiger is a jewel in the roughmartialtiger is a jewel in the rough
 



You need to escape certain characters.

Hope this helps http://www.php.net/addslashes.

Good luck!
__________________
EmailSyndicate :kickass:
martialtiger is offline  
Old 01-29-2007, 05:12 PM   #4 (permalink)
Senior Member
 
RegisterRants's Avatar
Join Date: Oct 2006
Location: NJ
Posts: 1,147
RegisterRants has a spectacular aura aboutRegisterRants has a spectacular aura aboutRegisterRants has a spectacular aura about
 




Try this.

Code:
$junk = array('.' , ',' , '/' , '\'' , '`' , ';' , '[' ,  ']' , '-', '_', '*', '&', '^', '%', '$', '#', '@', '!', '~', '+', '(', ')', '|', '{', '}', '<', '>', '?', ':', '"', '=');
__________________
Web Development
RegisterRants is offline  
Old 01-29-2007, 05:45 PM   #5 (permalink)
Dan
Buy my domains.
 
Dan's Avatar
Join Date: Feb 2006
Posts: 2,792
Dan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant future
 


Autism Autism Autism Autism Autism Autism Autism
Code:
$junk = array('.' , ',' , '/' , '\\' , '`' , ';' , '[' ,  ']' , '-', '_', '*', '&', '^', '%', '$', '#', '@', '!', '~', '+', '(', ')', '|', '{', '}', '<', '>', '?', ':', '"', '=');
You need to escape the \
Dan is offline  
Old 01-30-2007, 06:14 AM THREAD STARTER               #6 (permalink)
NamePros Regular
 
w1ww's Avatar
Join Date: Oct 2006
Location: Mars.
Posts: 439
w1ww is a jewel in the roughw1ww is a jewel in the roughw1ww is a jewel in the rough
 



Thank for the help guys
__________________
:notme:
w1ww is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


 
All times are GMT -7. The time now is 02:19 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger