What's new

PHP HELP PHP Library

sandangkal

Addict
Joined
Feb 26, 2020
Posts
247
Reaction
37
Ano po magandang PHP report library yung free and opensource?
Kahit yung simple lang sana thanks
 

dev-ace

Elite
idolo may references ka ba dyan? hehehe tsaka namomroblema pa ako sa photo uploading ko hahaha baka pwede mo ako gabayan please :D
php or php framework ?

idolo may references ka ba dyan? hehehe tsaka namomroblema pa ako sa photo uploading ko hahaha baka pwede mo ako gabayan please :D
image upload click here

You do not have permission to view the full content of this post. Log in or register now.
 
Last edited:
php or php framework ?


image upload click here

You do not have permission to view the full content of this post. Log in or register now.
core po sir dev, kasi gusto muna mapraktis ang core para mas familiar ako.. thank you

core po sir dev, kasi gusto muna mapraktis ang core para mas familiar ako.. thank you
1638750294907.png

yan po sir pero uploaded naman na yung photo sa folder na nasa server. naubusan na ko ng masesearch kay google kaya baka kailangan ko na ng master hehe
 

Attachments

Last edited:

usercoop

Leecher
$img_ext=explode(".",$image);
$image_ext=$img_ext['1'];
$image = rand(1,1000).rand(1,1000).time().".".$image_ext;
move_uploaded_file($tmp_image,"../sample/sample_img/$image");

ito idea
 
$img_ext=explode(".",$image);
$image_ext=$img_ext['1'];
$image = rand(1,1000).rand(1,1000).time().".".$image_ext;
move_uploaded_file($tmp_image,"../sample/sample_img/$image");

ito idea
naguupload sya sa folder kaso wala sa database column photo
 
varchar mo lang ung column type


patingin ng codes mo?

punta ka ng php.ini tas change mo ung file size upload based sa need mo.
<?php
include_once 'config/config.php';


$output_dir = "upload/";/* Path for file upload */
$RandomNum = time();
$ImageName = str_replace(' ','-',strtolower($_FILES['photo']['name'][0]));
$ImageType = $_FILES['photo']['type'][0];

$ImageExt = substr($ImageName, strrpos($ImageName, '.'));
$ImageExt = str_replace('.','',$ImageExt);
$ImageName = preg_replace("/\.[^.\s]{3,4}$/", "", $ImageName);
$NewImageName = $ImageName.'-'.$RandomNum.'.'.$ImageExt;
$ret[$NewImageName]= $output_dir.$NewImageName;

$permit_id = isset($_REQUEST['permit_id']);
/* Try to create the directory if it does not exist */
if (!file_exists($output_dir))
{
@mkdir($output_dir, 0777);
}
move_uploaded_file($_FILES["photo"]["tmp_name"][0],$output_dir."/".$NewImageName );
//$sql = "INSERT INTO permit(photo) VALUES ('$NewImageName') WHERE permit_code='$permit_code'";
$sql = "UPDATE permit SET photo='$ret[$NewImageName]' WHERE permit_id='$permit_id'";
if (mysqli_query($con, $sql)) {
//echo "successfully !";
echo "<script language='javascript'>alert('Photo " . $NewImageName. " Successfully!')</script>";
echo "<script>window.location.href='userrecords.php';</script>";
}
else {
echo "Error: " . $sql . "" . mysqli_error($con);
}

?>
 
Top