heptios Posted March 17, 2011 Report Share Posted March 17, 2011 Hoal chicos, bueno les cuento que a e estado varias horas tratando de que me funcione un script que esncontre pero que e modificado bastante y hay algo que no peudo lograr. bueno el tema es que este es mi codigo (parte) function displayAddForm(){ ?> <form class="iform" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> Nombre:<br/> <input type="text" name="name" size="30"/><br/><br/> Email:<br/> <input type="text" name="email" size="30"/><br/><br/> Su mensaje para el presidente:<br/> <textarea name="message" rows="7" cols="49"></textarea><br/> <center><input type="submit" name="submit" value="Publicar" /></center> </form> <?php } function insertMessage(){ $name = isset($_POST['name']) ? $_POST['name'] : 'Anonimo'; $email = isset($_POST['email']) ? $_POST['email'] : ''; $submitDate = date($this->dateFormat); $content = isset($_POST['message']) ? $_POST['message'] : ''; if (trim($name) == '') $name = 'Anonymous'; if (strlen($content)<5) { exit(); } $filename = date('YmdHis'); if (!file_exists($this->messageDir)){ mkdir($this->messageDir); } $f = fopen($this->messageDir.DIRECTORY_SEPARATOR.$filename.".txt","w+"); fwrite($f,$name."\n"); fwrite($f,$email."\n"); fwrite($f,$submitDate."\n"); fwrite($f,$content."\n") ; fclose($f); } } ? como podran ver este es un formulario y necesito que al momento que la persona escriba todo y se publique lo que escribio aparesca el logo de twitterar que seria el siguiente <a href="http://twitter.com/share" class="twitter-share-button" data-count="none" data-via="sebastianpinera" data-lang="es">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> ojala me haya explicado bien y alguien pueda ayudarme Link to comment Share on other sites More sharing options...
cañangasñangas Posted March 18, 2011 Report Share Posted March 18, 2011 <?php if($seEnvioElMensaje == true){ echo '<a href="http://twitter.com/share" class="twitter-share-button" data-count="none" data-via="sebastianpinera" data-lang="es">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>'; } else{ echo "Hubo un error"; } ?> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now