-
Posts
13 -
Joined
-
Last visited
About darphas
- Birthday 05/01/1990
Contact Methods
- MSN
-
Website URL
http://www.darphas.net
Profile Information
-
Gender
Not Telling
darphas's Achievements

Newbie (1/5)
0
Reputation
-
i tried this code and workds perfect show the actual time of my city but the code what i want is flettching the time stored in a database... <?php date_default_timezone_set("America/Monterrey"); echo "La hora en Victoria es: " . date ("H:i:s",time()) . "<br />"; ?>
-
hello i have a shared hosting in hostgator so, i cant change the default server clock. then i code a script to show my local city date, but doesnt work. anyone can help me? function muestrafecha($fecha){ $mes[1]="Enero"; $mes[2]="Febrero"; $mes[3]="Marzo"; $mes[4]="Abril"; $mes[5]="Mayo"; $mes[6]="Junio"; $mes[7]="Julio"; $mes[8]="Agosto"; $mes[9]="Septiembre"; $mes[10]="Octubre"; $mes[11]="Noviembre"; $mes[12]="Diciembre"; date_default_timezone_set("America/Monterrey"); return date("j",$fecha).' '.$mes[date("n",$fecha)].' '.date("Y",$fecha).'('.date("H:i:s",$fecha).')'; return $muestra; } the date works perfect, but the time zone appears + hour
-
Somethink like this <div class="MyDiv"> <h2>Title</h2> <p>Description</p> <img src="photo/img1.jpg"> </div> a little title with info and sometimes images.
-
I'm making a system and i want to add a button that if you click it.. will send some info from a div to a friend, but to be honest i dont have any idea how can i do this.. i used google to find info and i think is something like that can works <?php if (isset($_POST['email'])) { $to = "friendemail"; $subject = "Website Info"; $email = 'email'; $message = ???div content???; $headers = "From: $email"; $sent = mail($to, $subject, $message, $headers); if ($sent) { echo "<script>alert('Email has been sent')</script>"; } else { echo "<script>alert('Sorry Cannot send this email')</script>"; } } ?> the div sometimes contains images so i think this can help $str=htmlspecialchars("<div>testing the div</div>", ENT_QUOTES); $message = $str; $message =htmlspecialchars_decode($orignal_msg_body); Please help. x.x
-
Hi, i have a catalog that display 6 pictures in every item.. sometimes i need to send a specific photho from the item very quickly.. but i cant i tried everthing.. the process that i do is download the image and send it in outlook.. and thats very very low process! i try this code. Config mysql_query( "SELECT photo_caption,photo_description,photo_code,photo_filename,photo_filename2,photo_filename3,photo_filename4,photo_filename5,photo_filename6,photos FROM gallery_photos WHERE photo_id='".addslashes($pid)."'" ); list($photo_caption,$photo_description,$photo_code,$photo_filename,$photo_filename2,$photo_filename3,$photo_filename4,$photo_filename5,$photo_filename6,$photos) = mysql_fetch_array( $result ); <?php include_once('./phpMailer_v2.3/class.phpmailer.php'); $mail = new PHPMailer(); // defaults to using php "mail()" $body = "<body><img src='".$images_dir."/".$photo_filename."'></body>"; $mail->From = "[email protected]"; $mail->FromName = "First Last"; $mail->Subject = "Test Subject via mail()"; $mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test $mail->MsgHTML($body); $mail->AddAddress("[email protected]", "John Philips"); //$mail->AddAttachment("images/phpmailer.gif"); // attachment if(!$mail->Send()) { echo "Mailer Error: " . $mail->ErrorInfo; } else { echo "Message sent!"; } ?> i;m newbie in php i try some crazy things only if works but no all the time..
-
i want to print a variable if existe in a costum field on mysql database for example, the problem is that a make id query like index.php?id=1, index.php?id=2, etc.. and for example only the id=3 have a content in var. php code: $myvar="somecode or thins here" mysql table: name: Horse description: Black and 4 years old var:$myvar php code: function printvar(&$myvar) { if (isset($myvar)) { echo $myvar; } } i don't know what it happens but doesnt work please help
-
ok the problem is if i try to add andother row in the table.. all the other products have too an other space. and i only want to add more photho in a specific products but i dont know how i can make this change in that mini system. thanks for your reply jessica.
-
Hello everybody.. I'm a kind of newbie in php coding. i'm making a online catalog, of my dads company. it's works perfect but in some products i want to show more photos and i cant and when i add one more in a product all the other products appears the problem. i dont know what i can so to solve this problem. please help me. Database: Table: and here is the code that i use to show the images... $result = mysql_query( "SELECT photo_caption,photo_description,photo_code,photo_filename,photo_filename2,photo_filename3,photo_filename4,photo_filename5,photo_filename6 FROM gallery_photos WHERE photo_id='".addslashes($pid)."'" ); list($photo_caption,$photo_description,$photo_code,$photo_filename,$photo_filename2,$photo_filename3,$photo_filename4,$photo_filename5,$photo_filename6) = mysql_fetch_array( $result ); $nr = mysql_num_rows( $result ); mysql_free_result( $result ); if( empty( $nr ) ) { $result_final = "\t<tr><td>There is no Photos</td></tr>\n"; } else { $result = mysql_query( "SELECT category_name FROM gallery_category WHERE category_id='".addslashes($cid)."'" ); list($category_name) = mysql_fetch_array( $result ); mysql_free_result( $result ); $result_final .= " <div class='baseline'> <ul> <li><a href='javascript:history.back()'>Back</a> </li> <li><a href='index.php?pag=gallery'>Categories</a> </li> <li><a href='index.php?pag=ver&cid=$cid'>$category_name</a></li> </ul> <br style='clear:left;'/> </div> "; $result_final .= " <div class='descripcion'> <div id='slides'> <div class='slides_container'> <img src='".$images_dir."/".$photo_filename."' width='640' height='480' border='0' alt='Slide 1'/> <img src='".$images_dir."/".$photo_filename2."' width='640' height='480' border='0' alt='Slide 2'/> <img src='".$images_dir."/".$photo_filename3."' width='640' height='480' border='0' alt='Slide 3'/> <img src='".$images_dir."/".$photo_filename4."' width='640' height='480' border='0' alt='Slide 4'/> <img src='".$images_dir."/".$photo_filename5."' width='640' height='480' border='0' alt='Slide 5'/> <img src='".$images_dir."/".$photo_filename6."' width='640' height='480' border='0' alt='Slide 6'/> </div> <a href='#' class='prev'><img src='img/prev.png' width='28' height='44' alt='Arrow Prev'></a> <a href='#' class='next'><img src='img/next.png' width='28' height='44' alt='Arrow Next'></a> </div> <div class='textodesc'> <h2>$photo_caption</h2> <p><b></br></b>$photo_description</p> </div></div> "; } } and this is how appears in the browser
-
Thank you very much!
-
great brow.. and the link looks like?
-
i'm making a online catalog. upload images to the server and save the nanem in the db like 92.jpg,93.jpg etc.. so i wanto to know how to make a button to download the images.. i tried to put the url of the image but only display it in the browser. so please help.
-
oh my god! thank you very much! it works perfect
-
hello everybody. i'm making a online catalog and i have all it done, but i want to include a button to send the page product for e-mail or print it, so i want to know how i can search it in google or how is named kind of button to find examples or how it works.. please help. i'm newbie in php.