where's the initialization of $submit variable?
shaggy2dope2126 <[EMAIL PROTECTED]> wrote: heres the source code to a news
system that i am building for my
website, but for some reason when i hit submit, its not registering
that i am hitting it, and it displays the form again. i know its
doing this because i made a dummy page that displays a message if
submit is working, or not and it shows its not, if anyone has any
ideas on where i might have messed up, i would really like to know:
--note, its three in the morning where i am at, so bare with me
require '/home/ravensle/includes/sql.class.php';
$sql = new sql();
$sql->connect();
$table = array();
this is for the sql code to input the information into the table i need
if($submit)
{
echo $table;
//this is for the query section on where to input the data
if(count($table) > 1)
{
for ($X = 0; $X <= count($table); $X++)
{//insert date into table
$sql->query("INSERT INTO " . $table . "(id, subject, news, date,
author) VALUES (' ',$subject,$news,now(),$author)");
}
}
else
{
die("You are missing the table name");
}//ends the if table loop
}
else
{
//this is for the section where i display the form
?>
Subject: [input] by
[input]
[input] News
Main
[input] Articles
Main
[input] Magic
News Main
[input]
value="pirates_news_main">Pirates News Main
[input] VS News
Main
[input]
value="yugioh_news_main">Yu-Gi-Oh! News
[input]
value="magic_articles_main">Magic Articles Main
[input]
value="pirates_articles_main">Pirates Articles Main
[input] VS
Articles Main
[input]
value="yugioh_articles_main">Yu-Gi-Oh! Articles Main
[input]
}//ends the else statement
?>
The php_mysql group is dedicated to learn more about the PHP/MySQL web database
possibilities through group learning.
Yahoo! Groups Links
[Non-text portions of this message have been removed]
The php_mysql group is dedicated to learn more about the PHP/MySQL web database
possibilities through group learning.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php_mysql/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/