php, rendere cliccabile un link

  • Creatore Discussione Creatore Discussione cieli
  • Data di inizio Data di inizio

cieli

Nuovo Utente
3 Feb 2004
1
0
0
cieli.altervista.org
Premessa: non so niente di php (e poco anche di html).
Sto tentando di metter delle cartoline da spedire dal mio sitarello. Le spedisce, ma in formato testo, quindi il mio link non è cliccabile.
Ho cercato, scavato, scartabellato un po' ovunque. Non ho capito come fare.
Lo script (preso da Easy Postcard Version 1.2) è questo:

<?php
// set variables used in this PHP file:

$sitename = "http://cieli.altervista.org/";
$thankspage = "http://cieli.altervista.org/cartoline/thanks.htm";
$footer = "<br>--------<br>Spedita da $sitename";
$subject = "Una cartolina per te da $your_name";
$intro = "Ciao $friend_name,<br>$your_name ti ha mandato una cartolina<br>";

// start code:

if (($your_name == '') || ($your_email == '') || ($friend_name == '')|| ($message == ''))
{
echo "<div align=center>You <b>must</b> fill out all the fields in the form. <a href=javascript:history.back(-1)>Return to the form</a>.</div>";
}
else {

# Check for valid email address

$x = ereg("^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,3}$",$friend_email);

if($x==0)
# if no valid email address entered, display no email message
{
echo "<div align=center>You <b>must</b> specify a valid email address for your friend. <a href=javascript:history.back(-1)>Return to the form</a>.</div>";
}
else {

error_reporting(63);
include('class.html.mime.mail.inc');


/***************************************
** Read the chosen file into $attachment.
***************************************/
$filename = ($pic);
$attachment = fread($fp = fopen($filename, 'r'), filesize($filename));
fclose($fp);

/***************************************
** Create the mail object. Optional headers
***************************************/

$mail = new html_mime_mail('X-Mailer: Html Mime Mail Class');

/***************************************
** Create the message
***************************************/

$text = '';
$html = ($intro.$message.$footer);

/***************************************
** Add the text, html and embedded images.
***************************************/

$mail->add_html($html, $text);

/***************************************
** Add the attachment to the email.
***************************************/

$mail->add_attachment($attachment, ($pic), 'application/octet-stream');

/***************************************
** Set Character Set
***************************************/

$mail->set_charset('iso-8859-1', TRUE);

/***************************************
** Builds message.
***************************************/

$mail->build_message();

/***************************************
** Sends the message.
***************************************/

$mail->send(($friend_name), ($friend_email), ($your_name), ($your_email), ($subject));

// return thank you page for sender of the postcard
header("Location: $thankspage");
}
}
?>

Qualcuno mi potrebbe dire come fare? Grazie

:byebye:
 

Discussioni simili