First lemme say whatsup to everyone... this is my first post!
Anyway..... I learned from a book that told me to make a seperate .php page for a lot of stuff and I'm starting to learn how to combine them into one page so theres not 15 pages for one simple program.
here is the problem.
I have a Admin CP form on one page, its called:
add_interview.php
It has a form for adding interviews to a site. Usually I would do:
<form method="post" action="[b]do_addinterview.php[/b]">
But why waste a whole page when it can all be accomplished on one page right?
So I used:
<form method="post" action="<? $PHP_SELF; ?>">
Now this created two problems for me. How am I going to get the info submited to a MySQL DB? Well I thought of a simple quick solution... I can just do:
if (submit) bla bla bla enter all the stuff from this form into my DB
So obviously, when the submit button is pressed it will rerun the page and $submit has then occured so it will have a value of yes I believe... and tada, all is well...
BUT... I am also trying to check to make sure certain fields of the form have been filled out!
So I was taught to do:
if ((!$artist_group) || (!$interviewer) || (!$snippet) || (!$interview)) {
header( "Location: [url]http://interviews.com/admin/index.php[/url]" );
exit;
Well do you see my problem? I can't figure out how to have both if statements work? Any help would be great. I don't know PHP all that well.
Thanks Much!