 |
Forum PHP Romania - Discutii despre PHP, MySQL, Javascript, AJAX, etc Comunitatea PHP Romania
|
| Subiectul anterior :: Subiectul următor |
| Autor |
Mesaj |
AfterB
Data înscrierii: 28/Ian/2005
Mesaje: 38
Locație: Canada, Montreal
|
| Trimis: Vin Ian 28, 2005 8:12 pm Titlul subiectului: va rog sa ma ajutati... sunt nou in php |
|
|
detin un website si as dori sa includ in el un form php mailto pentru clientii mei
sa poata comanda produse. Am incercat sa scriu un cod pentru asa ceva dar nu-mi iese. Aici( www.pingnet.org/formular.htm) veti gasi formul meu pus pe un site. Va rog sa va uitati la el si la codul pe care il voi posta putin mai jos. Vreau sa va spun ca am niste probleme cu chack box-urile. Nu reusesc sa extrag informatiile din ele, aflate in form, (nu stiu icon_redface.gif ). Daca aveti timp va rog sa va uitati putin peste cod si sa imi spuneti unde am gresit si cum as putea indrepta greseala.
Cod: <?php
$admin_name="Ping NET Administrator";
$admin_email="support@pingnet.org";
/* User submitted form
send the message */
case SendMsg:
/* read in info from the form */
$name = $_REQUEST['name'];
$email = $_REQUEST['email'];
$check1 = $_REQUEST['html'];
$check2 = $_REQUEST['CompLogo'];
$check3 = $_REQUEST['smooth'];
$check4 = $_REQUEST['flashwelc'];
$check5 = $_REQUEST['simplewelc'];
$check6 = $_REQUEST['flashmen'];
$check7 = $_REQUEST['simplemen'];
$check8 = $_REQUEST['forum'];
$check9 = $_REQUEST['estore'];
$ip = $REMOTE_ADDR;
/* compile the message */
$msg = "Name: ".$name."\nEmail: ".
$email."\nIP: ".$ip."\n\n\nSimpleCode: ".$html."\nCompanyLogo: ".$CompLogo.
"\nSmoothLines: ".$smooh."\nFlashWelcome: ".$flashwelc."\nSimpleWelcome: ".$simplewelc.
"\nFlashMenu: ".$flashmen."\nSimpleMenu: ".$simplemen."\nForum: ".$forum.
"\neStore: ".$estore;
/* mail it and redirect */
mail($admin_email, "Feedback From \"$name [$email]\"", $msg, "From: $email");
header( "Location: http://pingnet.org/TESTS/feedback.php?req=MsgSent");
/* Print we have
sent the message */
case MsgSent:
MessageSent();
break;
/* Print that the message was sent */
function MessageSent() {
global $admin_name,$admin_email;
include("header.php");
echo "<h1>Your feedback has been sent!
Thank you for your message!</h1>\n
<p>- $admin_name [<a href=\"mailto:$admin_email.\" title=\"email me: $admin_email\">$admin_email</a>]</p>";
include("footer.php");
}
?>
variabilele $checkX sunt pentru check box-uri si cu acestea am probleme, nu cred ca reusesc sa extrag date din form legate de ele, si nici nu-mi trimite mailul. aici formularul--- www.pingnet.org/formular.htm si codul mai sus
va multumesc anticipat icon_smile.gif |
|
| Sus |
|
johnny
Data înscrierii: 31/Iul/2004
Mesaje: 904
Locație: Bucuresti
|
| Trimis: Sâm Ian 29, 2005 5:41 pm Titlul subiectului: |
|
|
an style="color: #000000"><?php if($_REQUEST['submit']) {
#cod trimitere email
#....
mail($admin_email, "Feedback From "$name [$email]"", $msg, "From: $email");
header( "Location: http://pingnet.org/TESTS/feedback.php?req=MsgSent");
}
#------------
if($_GET['req']=='MsgSent') {
MessageSent();
}
NU stiu de ce folosesti case .... Sintaxa case:
an style="color: #000000"><?php switch($optiune) {
case 'val1':
#instructiuni
break;
case 'val2':
#instructiuni
break;
#........
default:
break;
} |
|
| Sus |
|
PHPRomania Bot
Bot Member
Data înscrierii: 27/Dec/2007
Mesaje: 1
Locaţie: Server Google |
| Trimis: Mie Dec 26, 2007 7:01 pm Titlul subiectului: Ad |
|
|
|
|
|
| Sus |
|
| |
|