Jump to content

oldscholar

Members
  • Posts

    8
  • Joined

  • Last visited

Posts posted by oldscholar

  1. // I think the proper code for this is as follows://Please take note that MD5 or PASSWORD function of mysql varies from version 4 to version 5. $sql = mysql_query("UPDATE `users` SET password = MD5($password) WHERE email ='$email''"); //or $sql = mysql_query("UPDATE `users` SET password = PASSWORD($password) WHERE email ='$email''");

    Please read further regarding the changes of the password hash. http://dev.mysql.com...rd-hashing.html

  2. $i = 1;$sql = "select name,price,short_description,sku,weight,promotion from catalog_product_flat_'".$i."'". "UNION ALL";$query=$sql.substr(0,$sql.strlen($sql)-9);echo $query;//It seems you have problesm with the concatenation of values in the variable $query. Please inspect it again.

  3. HelloI have installed xampp on my pc and it looks fine cause system is running. Im having trouble running my php file on my pc/local host. It keeps on asking if i wanna save the file and the file is already saved and also dont wanna download the file when i press save.Please help?
    It seems that .php files are considered ordinary files and not being parsed by PHP. To resolve this, you need to modify your Apache httpd.conf file. At the bottom of the file and the following libes of directives. (Before adding, search the entire file and modify it) LoadModule php5_module "location/of/your/php/module"AddType application/x-httpd-php .php Restart your Apache server. Then test.
  4. Hello everyone please see this code :
    <?$data = array();$data[0] = "test";$data[1] = "price";$data[2] = "img";$data[3] = "img";echo(array_unique($data));?>

    if I wrote code like on above it won't show anything, but if I using print_r it can displayed Q : Actually can I display it using echo ? So that the result shown like this : please answer Thanks

    Try this <?$data = array();$data[0] = "test";$data[1] = "price";$data[2] = "img";$data[3] = "img"; $new_data = array_unique($data); foreach($new_data as $elements){ echo "<br>" . $elements; } ?>
×
×
  • Create New...