Jump to content

[SOLVED] Help Needed!


studgate

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.