Oppure

Loading
04/05/10 20:44
crack001
salve, ho scritto un form per inviare una stringa via email a 2 indirizzi...solo ke non funziona, cioè ne ho fatti altri simili per utilizzarli x lo stesso scopo ma con informazioni diverse e funzionano...questo no, c'è qualcosa che nn ho notato nella sintassi???

parte html

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
  
  <style type="text/css"></style>
  
  <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
  <title>Form invio ID</title>

  
</head><body>
<form method="post" action="/test/ftp/Invio ID/Invio_ID.php">
  <fieldset> <legend>Inserisci l'ID della transazione</legend>
 	 <label><input name="ID" maxlength="60" type="text"></label> </fieldset>

  <br>
	<input type="reset" value="Cancella">	
	<input type="submit" value="Invia">
</form>

</body></html>


parte php
<?php

	$dest = "indirizzo";
	$dest2= "indirizzo2";	
	$subject = "Ricezione ID transazione";
	
	$body="ID transazione\n\n";

	$body .="ID: " . trim(stripslashes($_POST[ID])) . "\n";;

	if((@mail($dest ,$subject, $body)) && (@mail($dest2 , $subject, $body)))
	{
		echo "Il messaggio è stato inviato correttamente";
	}
	else
	{
		echo "Il messaggio non può essere inviato contattare lo staff";
	}
	
	
	
?>

aaa
05/05/10 8:47
Thejuster
Postato originariamente da crack001:

salve, ho scritto un form per inviare una stringa via email a 2 indirizzi...solo ke non funziona, cioè ne ho fatti altri simili per utilizzarli x lo stesso scopo ma con informazioni diverse e funzionano...questo no, c'è qualcosa che nn ho notato nella sintassi???

parte html

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
  
  <style type="text/css"></style>
  
  <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
  <title>Form invio ID</title>

  
</head><body>
<form method="post" action="/test/ftp/Invio ID/Invio_ID.php">
  <fieldset> <legend>Inserisci l'ID della transazione</legend>
 	 <label><input name="ID" maxlength="60" type="text"></label> </fieldset>

  <br>
	<input type="reset" value="Cancella">	
	<input type="submit" value="Invia">
</form>

</body></html>


parte php
<?php

	$dest = "indirizzo";
	$dest2= "indirizzo2";	
	$subject = "Ricezione ID transazione";
	
	$body="ID transazione\n\n";

	$body .="ID: " . trim(stripslashes($_POST[ID])) . "\n";;

	if((@mail($dest ,$subject, $body)) && (@mail($dest2 , $subject, $body)))
	{
		echo "Il messaggio è stato inviato correttamente";
	}
	else
	{
		echo "Il messaggio non può essere inviato contattare lo staff";
	}
	
	
	
?>



Ho notato 2 cose.

1) sei sicuro che l'url inserito funzioni?
<form method="post" action="/test/ftp/Invio ID/Invio_ID.php">

di solito l'url non legge gli spazi a patto che non diventi Invio%20ID

2) Qui c'è un doppio end

	$body .="ID: " . trim(stripslashes($_POST[ID])) . "\n";;



mire.forumfree.it/ - Mire Engine
C# UI Designer
05/05/10 20:24
crack001
per quanto riguarda lo spazio, quello è un underscore...quindi nn vdo il problema, invece per la doppia chiusura la portava anche sul manuale, xo è strato xke nello stesso modo funziona anche in altri form, invece questo nn vuole proprio andare
aaa