Go to Post A constant awareness of safety is a plague I would welcome. - Alan Anderson [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #61   Spotlight this post!  
Unread 20-03-2006, 19:35
general's Avatar
general general is offline
That's me!
AKA: Bryan
FRC #0213 (Dirty Birds)
Team Role: Webmaster
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Keene
Posts: 48
general is an unknown quantity at this point
Send a message via AIM to general
Re: php/forms/posting/I NEED HELP!!!!!!!!!

Quote:
Originally Posted by MattD
Yeah, that works too. I just like to explicitly concatenate my strings. (Try saying that 3x fast..)
i don't even understand what you said
__________________
http://www.khsfirst.com/
  #62   Spotlight this post!  
Unread 20-03-2006, 19:40
MattD's Avatar
MattD MattD is offline
Registered User
AKA: Matthew Douglas
FRC #0228 (GUS Robotics)
Team Role: Alumni
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Indianapolis, IN
Posts: 185
MattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to behold
Send a message via AIM to MattD
Re: php/forms/posting/I NEED HELP!!!!!!!!!

Quote:
Originally Posted by general
i don't even understand what you said
Concatenation is the joining (or addition) or two or more strings of text. In PHP the string concatenation operator is "."

In most programming languages, when you want to add in the value of variable within a string of text, it must be concatenated with it, and not just within a string literal (everything inside the quotation marks) in order to be recognized. PHP picks up on the usage of variables inside of literals though, but I still like to use the concatenation operator. It's just a preference thing, really.
__________________
GUS Robotics Team 228

2010 WPI Engineering Inspiration Award
2010 WPI Regional Champions (Thanks 230 & 20!)
2010 CT VEX Champions
2010 CT VEX Innovate Award
2009 QCC VEX Champions
2009 CT Motorola Quality Award
2007 CT J&J Sportsmanship Award
2006 CT Best Website Award
  #63   Spotlight this post!  
Unread 20-03-2006, 20:05
general's Avatar
general general is offline
That's me!
AKA: Bryan
FRC #0213 (Dirty Birds)
Team Role: Webmaster
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Keene
Posts: 48
general is an unknown quantity at this point
Send a message via AIM to general
Re: php/forms/posting/I NEED HELP!!!!!!!!!

Thank you, all of you for all of your help!
__________________
http://www.khsfirst.com/
  #64   Spotlight this post!  
Unread 21-03-2006, 20:39
general's Avatar
general general is offline
That's me!
AKA: Bryan
FRC #0213 (Dirty Birds)
Team Role: Webmaster
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Keene
Posts: 48
general is an unknown quantity at this point
Send a message via AIM to general
Re: php/forms/posting/I NEED HELP!!!!!!!!!

sry got another question, Will this work?( all of the second ones are the code ex. <-- &#33--> is " ! ")

$write = str_replace("!", "!", $write);
$write = str_replace("$", "$", $write);
$write = str_replace("&", "&", $write);
$write = str_replace("'", "'", $write);
$write = str_replace("(", "(", $write);
$write = str_replace(")", ")", $write);
$write = str_replace(",", ",", $write);
$write = str_replace(";", ";", $write);
$write = str_replace("?", "?", $write);
$write = str_replace("^", "^", $write);

And will two words work in a
PHP Code:
str_replac() 
__________________
http://www.khsfirst.com/
  #65   Spotlight this post!  
Unread 21-03-2006, 21:35
Mike's Avatar
Mike Mike is offline
has common ground with Matt Krass
AKA: Mike Sorrenti
FRC #0237 (Sie-H2O-Bots (See-Hoe-Bots) [T.R.I.B.E.])
Team Role: Programmer
 
Join Date: Dec 2004
Rookie Year: 2004
Location: Watertown, CT
Posts: 1,003
Mike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond repute
Re: php/forms/posting/I NEED HELP!!!!!!!!!

Quote:
Originally Posted by general
sry got another question, Will this work?( all of the second ones are the code ex. <-- &#33--> is " ! ")

$write = str_replace("!", "!", $write);
$write = str_replace("$", "$", $write);
$write = str_replace("&", "&", $write);
$write = str_replace("'", "'", $write);
$write = str_replace("(", "(", $write);
$write = str_replace(")", ")", $write);
$write = str_replace(",", ",", $write);
$write = str_replace(";", ";", $write);
$write = str_replace("?", "?", $write);
$write = str_replace("^", "^", $write);

And will two words work in a
PHP Code:
str_replac() 
Use arrays instead of a ton of str_replace calls.

Example:
$bad_words = array('guy', 'dog', 'cat');
$good_words = array('male', 'canine', 'feline');
$write = str_replace($good_words, $bad_words, $write);
__________________
http://www.mikesorrenti.com/
  #66   Spotlight this post!  
Unread 21-03-2006, 21:44
MattD's Avatar
MattD MattD is offline
Registered User
AKA: Matthew Douglas
FRC #0228 (GUS Robotics)
Team Role: Alumni
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Indianapolis, IN
Posts: 185
MattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to behold
Send a message via AIM to MattD
Re: php/forms/posting/I NEED HELP!!!!!!!!!

Quote:
Originally Posted by general
sry got another question, Will this work?( all of the second ones are the code ex. <-- &#33--> is " ! ")
If you're looking to handle HTML entities, I would just use the htmlentities() function, rather then hard-coding every entity that you want to have replaced.

PHP Code:
$write htmlentities($writeENT_QUOTES); 
__________________
GUS Robotics Team 228

2010 WPI Engineering Inspiration Award
2010 WPI Regional Champions (Thanks 230 & 20!)
2010 CT VEX Champions
2010 CT VEX Innovate Award
2009 QCC VEX Champions
2009 CT Motorola Quality Award
2007 CT J&J Sportsmanship Award
2006 CT Best Website Award
  #67   Spotlight this post!  
Unread 21-03-2006, 22:38
general's Avatar
general general is offline
That's me!
AKA: Bryan
FRC #0213 (Dirty Birds)
Team Role: Webmaster
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Keene
Posts: 48
general is an unknown quantity at this point
Send a message via AIM to general
Re: php/forms/posting/I NEED HELP!!!!!!!!!

oh shoooooooooooot, all the str_replace s are case sensitive!!!!!!!!!!!!!!!!!!
__________________
http://www.khsfirst.com/
  #68   Spotlight this post!  
Unread 21-03-2006, 22:49
Mike's Avatar
Mike Mike is offline
has common ground with Matt Krass
AKA: Mike Sorrenti
FRC #0237 (Sie-H2O-Bots (See-Hoe-Bots) [T.R.I.B.E.])
Team Role: Programmer
 
Join Date: Dec 2004
Rookie Year: 2004
Location: Watertown, CT
Posts: 1,003
Mike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond repute
Re: php/forms/posting/I NEED HELP!!!!!!!!!

Quote:
Originally Posted by general
oh shoooooooooooot, all the str_replace s are case sensitive!!!!!!!!!!!!!!!!!!
Use str_ireplace
Same thing as str_replace, but case insensitive.
__________________
http://www.mikesorrenti.com/
  #69   Spotlight this post!  
Unread 21-03-2006, 22:51
general's Avatar
general general is offline
That's me!
AKA: Bryan
FRC #0213 (Dirty Birds)
Team Role: Webmaster
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Keene
Posts: 48
general is an unknown quantity at this point
Send a message via AIM to general
Re: php/forms/posting/I NEED HELP!!!!!!!!!

Quote:
Originally Posted by Mike
Use str_ireplace
Same thing as str_replace, but case insensitive.
it dosent work in my version
__________________
http://www.khsfirst.com/
  #70   Spotlight this post!  
Unread 29-03-2006, 14:36
general's Avatar
general general is offline
That's me!
AKA: Bryan
FRC #0213 (Dirty Birds)
Team Role: Webmaster
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Keene
Posts: 48
general is an unknown quantity at this point
Send a message via AIM to general
Re: php/forms/posting/I NEED HELP!!!!!!!!!

ok so it works great, but now theres like 25 quotes. I want to make a second page so you dont have to scroll forever to get to the bottom. Do i have to make a new database or can i use the same one?
__________________
http://www.khsfirst.com/
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 06:05.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi