Autor | Zpráva | ||
---|---|---|---|
jhruskovic Profil |
#1 · Zasláno: 31. 8. 2012, 21:37:13 · Upravil/a: jhruskovic
V mém skriptu pro odeslání sms mi při odeslání píše chybu: Parse error: syntax error, unexpected T_ELSE in /home/users/jhruskovic/jhruskovic.8u.cz/web/smsod.php on line 31. Avšak na lajně 31 chyba není. Nevíte kde je chyba?
Zde je skript: <!DOCTYPE html> <head> <meta http-equiv="content-type" content="text/html; charset=Windows-1250"Windows-1250"> <meta name="generator" content="PSPad editor, www.pspad.com"> </head> <body> <body bgcolor="#0080d2"> <?php $cislo = $_POST["tel"]; $zprava = $_POST["text"]; $email = $cislo . '@sms.cz.o2.com'; $vysledek = mail($email, $zprava, "", ""); if (ereg('60[1267][0-9]+$', $cislo)) { echo '<center><h1><font color="#FFFFFF">Zpráva byla úspěšně odeslána.</h1></center><meta http-equiv="refresh" content="4;url=http://www.jhruskovic.8u.cz"> <style> a:link {color: #0080d2} a:visited {color: #0080d2} a:active {color: #0080d2} </style>'; } else { echo '<center><h1><font color="#FFFFFF">Nastala chyba, zpráva nebyla odeslána</h1></center><meta http-equiv="refresh" content="4;url=http://www.jhruskovic.8u.cz"> <style> a:link {color: #0080d2} a:visited {color: #0080d2} a:active {color: #0080d2} </style>'; } else if (ereg('72[0-9][0-9]+$', $cislo)) { echo '<center><h1><font color="#FFFFFF">Zpráva byla úspěšně odeslána.</h1></center><meta http-equiv="refresh" content="4;url=http://www.jhruskovic.8u.cz"> <style> a:link {color: #0080d2} a:visited {color: #0080d2} a:active {color: #0080d2} </style>'; } else { echo '<center><h1><font color="#FFFFFF">Nastala chyba, zpráva nebyla odeslána</h1></center><meta http-equiv="refresh" content="4;url=http://www.jhruskovic.8u.cz"> <style> a:link {color: #0080d2} a:visited {color: #0080d2} a:active {color: #0080d2} </style>'; } else echo 'Špatně jste zadali telefonní číslo, nebo číslo není u O2'; ?> Vyřešeno, neměl jsem tam if ($vysledek) |
||
Darker Profil |
#2 · Zasláno: 31. 8. 2012, 21:41:46
Máš tam toto:
if() { /*...*/ } else { /*...*/ } elseif() { /*...*/ } |
||
Časová prodleva: 12 let
|
0