Jump to content

dharmeshpat

Members
  • Posts

    21
  • Joined

  • Last visited

    Never

About dharmeshpat

  • Birthday 09/02/1987

Profile Information

  • Gender
    Male
  • Location
    Maharashtra / India

dharmeshpat's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. dude don't do the hard delete do soft delete example put one more column in database say "status" when user is created the status column for that user will be default active and as soon as u try to delete the record don't delete the record just change the status to deactivated and now when ever u try to display the list of user just display the list with active status
  2. i do know that but it would be great help i you can tell us the best and most suitable way to achieve the result Rather than pointing the fingers on others
  3. <?php $path = $_SERVER['SCRIPT_NAME']; $script = explode("/", $path); $filename = explode(".", $script[sizeof($script) - 1]); ?> <li class="link"> <a class="link levela" title="The drive formally known as "P""> <span>Company Documents</span></a> <ul> <li class="link"> <a class="<?php if ($filename[0] == "comm_forms") { echo "current"; }else{ echo "link"; } ?> levelb" href="http://hhnet/company_documents/comm_forms.php" title="Forms... for Commission"> <span>Commission Forms</span></a></li> <li class="link"> <a class="<?php if ($filename[0] == "complaint_documentation") { echo "current"; }else{ echo "link"; } ?> levelb" href="http://hhnet/company_documents/complaint_documentation.php" title="Documents documenting complaints."> <span>Complaint Documentation</span></a></li>
  4. put this code above ur php include file name menu.php <?php $path = $_SERVER['SCRIPT_NAME']; $script = explode("/", $path); $filename = explode(".", $script[sizeof($script) - 1]); ?>
  5. if($_SESSION['name']){ echo "<option value='".$_SESSION['name']."'>".$_SESSION['name']."</option>"; }
  6. wat u can do is u should put one flag column in database which will tell u whether the logged in user is admin or a normal client Once u know which user has logged u u can redirect that user to the respective url And yes it would be better to have different folder for different user type say for admin it would be admin folder and for user it would be user folder
  7. according to me i think ur using same name for the variable or object for the queries please try to use different name for variable or query and than try it will get resolved
  8. $query = "SELECT * "; $query .= "FROM table "; $query .= "WHERE malls_id=" . $mall_id; $query .=" AND DATE_FORMAT(date ,'%Y-%m' ) =" . $selected_date; the above query has to be modified as below $query = "SELECT * "; $query .= "FROM table "; $query .= "WHERE malls_id=" . $mall_id; $query .=" AND YEAR(date) = '".$year."' AND MONTH(date) = '".$month."'";
  9. one thing u can do just to hide that warning use @session_start();
  10. Hi dude still i m not completely cleared but If you are getting value in an array format than u don't u store it in a variable and than use that variable to get that data example $valueHolder = $json->call('getBits',Array()); print_r($valueHolder['success']);
  11. hi herghost are u getting json result from ajax call from php page can u explain me bit about this i think i can help u out for the same
  12. Can you try the code the way i have written don't change it place it has it is and try it out function findexts ($filename) { $filename = strtolower($filename) ; $exts = split("[/\\.]", $filename) ; $n = count($exts)-1; $exts = $exts[$n]; return $exts; } $ext = findexts ($_FILES['foto']['name']) ; $ran2 = $foto."."; $target = "../images/"; $target = $target . $ran2.$ext; while (file_exists($target)) { $ran2 = 'copyof'.$ran2; $target = $target . $ran2.$ext; } if(move_uploaded_file($_FILES['foto']['tmp_name'], $target)) { $newFilename = $ran2 . "." . $ext; mysql_query( "INSERT INTO `softmarket`.`internet_securitate` (`internet_securitateID`, `nume_produs`, `descriere`, `versiune`,`poza`, `pret`, `disponibilitate_produs`) VALUES ('', '$_POST[titlu]', '$_POST[descriere]', '$_POST[versiune]', '$newFilename', '$_POST[pret]', '$_POST[disponibilitate]');"); echo "The file has been uploaded as ".$newFilename; } else { echo "Sorry, there was a problem uploading your file."; } header('Location: succes.php');
  13. Try this below regex won't allow the numerice value /^[a-zA-Z\s]+/
  14. i got one can u just send me detail description abt ur problem
  15. try this out preg_match('/^[a-zA-Z\s]+/', 'this may or may not be valid with 1')
×
×
  • 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.