O
old.nemof
Guest
Hey all, I've got a question.
I've got a form that passes two variables $headline and $news to a php script called postnews.php.
What I want to do is to check both variables to see that something is in them(so that news without a headline or content isn't posted), and if there are values there to carry on the script (which will then insert them into a database).
I'm thinking that ereg() would be the correct thing to use, but as far as I can see it ereg() will only take one variable and then output that variable as an array. Is it possible to get ereg() to take more than one variable, or is there an alternative way of checking both variables to make sure there is an alphanumeric value present?
Or, possibly am I just missing something?
I've got a form that passes two variables $headline and $news to a php script called postnews.php.
What I want to do is to check both variables to see that something is in them(so that news without a headline or content isn't posted), and if there are values there to carry on the script (which will then insert them into a database).
I'm thinking that ereg() would be the correct thing to use, but as far as I can see it ereg() will only take one variable and then output that variable as an array. Is it possible to get ereg() to take more than one variable, or is there an alternative way of checking both variables to make sure there is an alphanumeric value present?
Or, possibly am I just missing something?