studgate Posted February 24, 2007 Share Posted February 24, 2007 I am trying to understand what's that mean?? if (isset($HTTP_POST_VARS['editid']) && (int)$HTTP_POST_VARS['editid']>0 ){ echo '<pre>'; print_r($HTTP_POST_VARS); $strsql = "UPDATE report set date, artist, info, ..., ... FROM report"; $ressql = mysql_query($strsql); & this one: if (!isset($HTTP_GET_VARS['editid']) && !isset($HTTP_POST_VARS['editid'])){ $strsql = "SELECT date, artist, info, ..., ... FROM report"; $ressql = mysql_query($strsql); if (mysql_num_rows($ressql)>0){ Please explain it so I can understand a little, I am new. Link to comment https://forums.phpfreaks.com/topic/39966-solved-help-needed/ Share on other sites More sharing options...
magic2goodil Posted February 24, 2007 Share Posted February 24, 2007 I am trying to understand what's that mean?? //Conditional statement asking if there is a variable named editid in the $_POST array [b]AND[/b]is it as an integer greater than 0 if (isset($HTTP_POST_VARS['editid']) && (int)$HTTP_POST_VARS['editid']>0 ){ //IF the above conditional evaluates to true, then echo to the screen the $_POST array echo '<pre>'; print_r($HTTP_POST_VARS); //also create a variable name $strsql that will be used to update existing data in report table(although that ... crap and the FROM do not belong in the update) $strsql = "UPDATE report set date, artist, info, ..., ... FROM report"; $ressql = mysql_query($strsql); & this one: //READ WHAT I SAID FO THE LAST SECTION AND YOU TELL US WHAT ALL YOU THINK THIS ONE DOES(HINT: SELECT RETURNS DATA STORED IN THE DATABASE) if (!isset($HTTP_GET_VARS['editid']) && !isset($HTTP_POST_VARS['editid'])){ $strsql = "SELECT date, artist, info, ..., ... FROM report"; $ressql = mysql_query($strsql); if (mysql_num_rows($ressql)>0){ Please explain it so I can understand a little, I am new. Link to comment https://forums.phpfreaks.com/topic/39966-solved-help-needed/#findComment-193250 Share on other sites More sharing options...
studgate Posted February 24, 2007 Author Share Posted February 24, 2007 Thanks magic2goodil! I got it now. the second condition simply ask to see if there is no such variable, create one that connects to the report table and get the data from the report table. Is that right? Link to comment https://forums.phpfreaks.com/topic/39966-solved-help-needed/#findComment-193266 Share on other sites More sharing options...
magic2goodil Posted February 24, 2007 Share Posted February 24, 2007 Pretty much Link to comment https://forums.phpfreaks.com/topic/39966-solved-help-needed/#findComment-193270 Share on other sites More sharing options...
studgate Posted February 24, 2007 Author Share Posted February 24, 2007 Thank you very much! Link to comment https://forums.phpfreaks.com/topic/39966-solved-help-needed/#findComment-193272 Share on other sites More sharing options...
magic2goodil Posted February 24, 2007 Share Posted February 24, 2007 Link to comment https://forums.phpfreaks.com/topic/39966-solved-help-needed/#findComment-193279 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.