Jump to content

abubaker0000

Members
  • Content Count

    22
  • Joined

  • Last visited

Community Reputation

0 Neutral

About abubaker0000

  • Rank
    Member
  1. abubaker0000

    php multi pages function

    I make this function but not work function work_image_multipages($num_of_itmes,$sended_page) { global $con; if(!isset($_GET['page'])) { $page=1; } else { $page=(int)$_GET['page']; } $records_at_page=$num_of_itmes; $q=mysqli_query($con,'select * from images'); $records_count=mysqli_num_rows($q); mysqli_free_result($q); $page_count=(int)ceil($records_count/$records_at_page); if(($page>$page_count)||($page<=0)) { mysqli_close($con); die('no pages'); } $start=($page-1)*$records_at_page; $end=$records_at_page; if($records_count!=0) { $query=mysqli_query($con,'select * from images LIMIT $start,$end'); $icount=mysqli_num_rows($query); $items=array(); for($i=0; $i<$icount; $i++) { $items[count($items)]=mysqli_fetch_object($query); } } mysqli_free_result($query); return($items); //print the numbers of pages for($i=0; $i<=$page_count; $i++) { if($page==$i) { echo $page; } else { echo '<a href="$sended_page?page'.$i.'">'.$i.'</a>'; } } }
  2. abubaker0000

    php multi pages function

    where excatly ?
  3. abubaker0000

    php multi pages function

    hi how can I make a function for multi pages , the function accept two arguments (page name, number of records which showed in one page). and returns the data from the table , also returns the number of pages
  4. abubaker0000

    move_uploaded_file function change the file name

    there are many files ... so that may get same name?
  5. I used the move_uploaded_file function to upload files to my server ,but the function changes the Arabic names of files because most of my files are Arabic named how can I fix that ?
  6. abubaker0000

    how can I make a text box as line

    I do it but in mouse click(focus) the border shadow is visible
  7. abubaker0000

    how can I make a text box as line

    how I can hide it ?
  8. abubaker0000

    how can I make a text box as line

    how can make the text box like line as in the photo
  9. abubaker0000

    script can't upload the large files

    it's by default but cant upload 12MB size image also when I upload a large size image the not give me "DONE" or "ERROR" in the browser
  10. <!doctype html> <html> <head> <meta content="text/html; charset=utf-8" http-equiv="content-type"> <title>Untitled Document</title> </head> <body> <form action="upload_image.php" method="post" enctype="multipart/form-data"> <label>select page<input type="file" name="image"> <input type="submit" name="upload"> </label> </form> <?php if(isset($_POST['upload'])) { $image_name=$_FILES['image']['name']; //return the name ot image $image_type=$_FILES['image']['type']; //return the value of image $image_size=$_FILES['image']['size']; //return the size of image $image_tmp_name=$_FILES['image']['tmp_name'];//return the value if($image_name=='') { echo '<script type="text/javascript">alert("please select image")</script>'; exit(); } else { $ex=move_uploaded_file($image_tmp_name,"image/".$image_name); if($ex) { echo 'image upload done "<br>"'; echo $image_name.'<br>'; echo $image_size.'<br>'; echo $image_type.'<br>'; echo $image_tmp_name.'<br>'; } else { echo 'error'; } } } ?> </body> </html> I make this simple script for upload files like photo , It's work correctly ,but not upload the large files ex 8MB images 12MB images
  11. abubaker0000

    function logic funcion

    thanks a lot .... I found the mistake ..... in the query ..... the values word is wrong
  12. abubaker0000

    function logic funcion

    because it's no syntax error
  13. abubaker0000

    function logic funcion

    there are no data inserted in the table
  14. abubaker0000

    function logic funcion

    function abuf_user_add($name,$password,$email,$isadmin) { global $af_con; if((empty($name)) || (empty($password)) || (empty($email)) || empty($isadmin)) { return false; // for check that is not empty } $n_email =mysqli_real_escape_string($af_con,strip_tags($email)); if(!filter_var($n_email,FILTER_VALIDATE_EMAIL))//for make sure that is email { return false; } $n_name =mysqli_real_escape_string($af_con,strip_tags($name));// $n_pass =md5(mysqli_real_escape_string($af_con,strip_tags($password)));// for encrypting password $n_isadmin=(int)$isadmin; $query=sprintf("insert into `user` valuse (NULL,'%s','%s','%s','%d')",$n_name,$n_pass,$email,$n_isadmin); echo $query; $qresult=mysqli_query($af_con,$query); if(!$qresult) { return false; } return true; } in this insert function there is a logic error ... how I can fix it ?
  15. abubaker0000

    how I can make a commit script

    yes , but how that
×

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.