A question

They have: 45 posts

Joined: Aug 2000

I am trying to get this thing to check if the user entered a certain type of text, like this:

if($form{'customstyle'} =~ m/comments/) {
exit;
} else {
&error('You did not enter a comment tag');
}
'

Laguna Loire
Site Director: Laguna's Jukebox (http://jukebox.3dstream.net)
Site Admin: RPGBoards (http://rpgboards.3dstream.net)

They have: 60 posts

Joined: Aug 2000

So it works or not? It looks fine to me!

They have: 45 posts

Joined: Aug 2000

I will try it again..

They have: 193 posts

Joined: Feb 2000

Are you still having problems?

BTW, the exit; call if they typed in comments would cause the script to perform a 500.

Richard
richjb::423

They have: 850 posts

Joined: Jul 1999

Your code looks fine.
with

} else {
&error('You did not enter a comment tag');
}
'

just make sure you made the sub 'error'. Which would probably look something like:
[code]
sub error
{
print @_;
}
[code]

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

what is the 'exit' doing there?

Me no understand!

Shouldn't that cause it to exit the whole script?
or just the if statement? (cause it's enpty without that, so it should do nothing anyways)

Mark Hensler
If there is no answer on Google, then there is no question.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.