Jump to content

Yohanne

Members
  • Posts

    216
  • Joined

  • Last visited

Everything posted by Yohanne

  1. ha? sorry but i cant understand? how it get wrong?
  2. Hi all, could you share us how to get or code somthing url like this: index.php?tab=AdminCatalog&token=0126f77dbc39a85996398fb69bf3699841 i need it to do this for my admin fortal. thanks you.
  3. hi all, why i got this error Fatal error: Can't use method return value in write context in? in line 14 error <?php class item_controller { public function set_safe($value) { return mysql_real_escape_string($value); } public function check_first() { $func_array = array(); if(isset($_POST['new']) && 'Add' == $_POST['new']) { if(empty($this->set_safe($_POST['categoryname']))); { $func_array[] = 'invalid value, category'; } else { $this->set_safe($_POST['categoryname']) = stripslashes($this->get_safe($_POST['categoryname'])); } if(empty($this->get_safe($_POST['productname']))) { $func_array[] = 'invalid value, Product/Item'; } else { $this->get_safe($_POST['productname']) = stripslashes($this->get_safe(['productname'])); } if(empty($this->get_safe($_POST['description']))) { $func_array[] = 'invalid value, Description'; } else { $this->get_safe($_POST['description']) = stripslashes($this->get_safe($_POST['description'])); } if(sizeof($creat_array)>0) { foreach($func_array as $new_array); echo "$new_array"; } else { require '../new_function/new_item.php'; } } else { return false; } } } $controller = new item_controller(); $controller->check_first(); ?>
  4. what probably error say? or check out quote header('Location:page.php');
  5. What i mean is a security token. sometimes it found in admin page.
  6. if you are using require tag, change it into include. try.
  7. hi do you have any idea how session token works?
  8. actually im doing admin page, thats why i need to do something like on other admin page.
  9. OH.. i though it is safe.. and so what sould i do? to make my url look something lots of number =930943i387372xzass0
  10. hi all.. how to put session id into url? like this home.php?myid=9023772811 and it could be happen after login.
  11. Thanks for the replay and now i get it and solve.. Thanks <?php define ('DB_SERVER_', 'localhost'); define ('DB_USER_', 'root'); define ('DB_PASS_', ''); define ('DB_NAME_', 'ocs_proton'); class DB_class { function __construct() { $Conn = mysql_connect(DB_SERVER_, DB_USER_, DB_PASS_) or die("Server not Conneceted -> $Conn". sha1(mysql_error())); mysql_select_db(DB_NAME_, $Conn) or die("database not connected -> $Conn". sha1(mysql_error())); echo "$Conn"; } } $ = new DB_class(); ?>
  12. okay, i put root as a username here.. and i have an tag echo to initialize if code is running. but its get empty. means there is something wrong. with it.
  13. Hi all, could you help me.. what getting wrong with this code? it is not work. <?php define ('DB_SERVER_', 'localhost'); define ('DB_USER_', ''); define ('DB_PASS_', ''); define ('DB_NAME_', 'ocs_proton'); class DB_class { public function __construct() { $Conn = mysql_connect(DB_SERVER_, DB_USER_, DB_PASS_) or die('Server not Conneceted -> $Conn'. mysql_error()); mysql_select_db(DB_NAME_, $Conn) or die('database not connected -> $Conn'. mysql_error()); echo '$Conn'; } } ?> Thanks..
  14. Hi all. i got problem? when i try your suggested code above, in my local pc using xampp it work good. but when i trying to publish the code to make it live, is dose not work any more. why? any help please.. here is the live ulr http://www.octagon.com.ph/aocs_ncr.php Thanks you..
  15. Hi.. to cyberRobot and gristoi Thanks a lot for the reply.. and now i got it. thanks you.
  16. hi all. i am new and i want to learn php and need somebody help. could you help to find out the exact reason why it's not work.. it regards page cannot load using header.. take a look code -> <form name = "form_branch_locator_" method = "GET" action = "<?php echo $_SERVER['REQUEST_UR'];?>"> <select name = 'GET_VALUE_REGION' onchange = 'this.form.submit()'> <option value = "">Select Region</option> <option value = "AR">All Region</option> <option value = "NCR">National Capital Region</option> <option value = "NL">Northern Luzon</option> <option value = "SL">Southern Luzon</option> <option value = "VI">Visayas</option> <option value = "NM">Northern Mindanao</option> <option value = "SM">Southern Mindanao</option> </select> <noscript><input type = "submit" name = "submit" value = "Search"></noscript> <?php if(isset($_GET["GET_VALUE_REGION"]) == "submit") { if(isset($_GET["GET_VALUE_REGION"]) == "NCR") { header("Location: aocs_ncr.php"); exit(); } if(isset($_GET["GET_VALUE_REGION"])== "NL") { header("Location: aocs_nl-pg.php"); exit(); } if(isset($_GET["GET_VALUE_REGION"])== "SL") { header("Location: aocs_nl-pg.php"); } if(isset($_GET["GET_VALUE_REGION"])== "VI") { header("Location: aocs_nl-pg.php"); } if(isset($_GET["GET_VALUE_REGION"])=="NM") { header("Location: aocs_nl-pg.php"); } if(isset($_GET["GET_VALUE_REGION"])== "SM") { header("Location: aocs_nl-pg.php"); } else { echo "error"; } } ?> it is not work to jump another page. Thanks
×
×
  • 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.