Jump to content

gdure

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

gdure's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. <? $db_name = 'interna1_loginmanager'; $db_hostname = 'localhost'; $db_username = 'interna1'; $db_password = 'gfd4647'; # Select database $con = mysql_connect($db_hostname, $db_username, $db_password); if (!$con) { die ('Can\'t use database : ' . mysql_error()); } else{echo 'Connected successfully'; } # Select database $db_selected = mysql_select_db($db_name, $con); if (!$db_selected) { die ('Can\'t use database : ' . mysql_error()); } $res = mysql_query("SELECT * FROM globetrack") or die(mysql_error()); $v_gblcount=gblcount; $v_afcount=afcount; $v_Algcount=Algcount; $v_Angcount=Angcount; $v_country=Algeria; switch ($v_country) { case Algeria: echo "<b><p>Country is Algeria</b></p>"; $v_gblcount=gblcount+1; $v_afcount=afcount+1; $v_Algcount=Algcount+1; $v_continent=Africa; echo "<br>"; break; case Angola: echo "Country is Angola"; $v_gblcount=gblcount+1; $v_Angcount=Angcount+1; $v_continent=Africa; $v_afcount=afcount+1; echo "<br>"; break; default: echo "Country not in Africa"; break; } //mysql_query("UPDATE globetrack SET //(gblcount,afcount,Algcount,Angcount,continent) values //('$v_gblcount','$v_afcount','$v_Algcount','$v_Angcount','$v_continent //')"); mysql_query("UPDATE globetrack SET (gblcount = '$v_gblcount', afcount = '$v_afcount', Algcount = '$v_Algcount', Angcount = '$v_Angcount', continent = '$v_continent'"); mysql_close($con); ?>
×
×
  • 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.