![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
14/05/2012, 07:55
|
![Avatar de aaronlevin51](http://static.forosdelweb.com/customavatars/avatar463661_1.gif) | | | Fecha de Ingreso: mayo-2012 Ubicación: colombia
Mensajes: 13
Antigüedad: 12 años, 9 meses Puntos: 0 | |
Respuesta: tomar fotos en php y guardar ruta en bd buen día amigo, gracias por responder, de verdad así lo hice. pero no inserta nada.
<?php
require_once("class/class.php");
date_default_timezone_set("bogota/lima/quito
");
/* JPEGCam Test Script */
/* Receives JPEG webcam submission and saves to local file. */
/* Make sure your directory has permission to write files as your web server user! */
$filename = $_GET["id"].'.jpg'; // $filename es el nombre del achivo
//$filename="cesar.jpg";
$result = file_put_contents( "fotos/".$filename, file_get_contents('php://input') );
if (!$result) {
print "ERROR: Failed to write data to $filename, check permissions\n";
exit();
}
$_SESSION["foto"]=$filename;
mysql_query("INSERT INTO prueba set foto=$filename");
?>
para mas informacion si |