fantomel
Members-
Posts
186 -
Joined
-
Last visited
Everything posted by fantomel
-
yes i understand and i know but i've checked the files both three times and even a friend helped there is nothing wrong in them or maybe we can't notice
-
ok so i`m building a small website..and i've written some php code for it but it seems that on contact form i have some errors and still the editors don't show anything maybe you guys can help me around home page where the include heapens <?php if($url == 'home') { echo '<img src="../resources/img/content/home_girl.png" style="float:right;margin: 5px; margin-right: 20px; margin-top: 20px;" width="300px" height="208">'; } if($url == 'quality') { echo'<img src="../resources/img/content/labpic_03.png" style="float:right; margin:5px" width="200px" height="270">'; } echo $content_page; if($url == 'gallery') { include_once('gallery.php'); } elseif($url == 'howto') { include_once('howto.php'); } elseif($url == 'home') { include_once('eco.php'); } elseif($url == 'contact' && $lang == 'en') { include_once('contact.php'); } elseif($url == 'contact' && $lang == 'ro') { include_once('contactro.php'); } ?> <?php function afisare_formular($stare=1) { /* daca valoarea variabilei $stare este 1 atunci se afiseaza formularul normal si se seteaza valorile din formular la 0 */ if ($stare == 1) { $nume = ''; $email = ''; $telefon = ''; $mesaj = ''; } /* daca valoarea variabilei $stare este diferita de 1 atunci se preiau mai intai datele trimise anterior prin POST din formular si se afiseaza formularul din nou dar cu valorile primite. */ else { $nume = $_POST['nume']; $email = $_POST['email']; $telefon = $_POST['telefon']; $mesaj = $_POST['mesaj']; } // se genereaza variabila cu tabelul care contine formularul $formular = ' <div class="contact_form"> <fieldset> <form name="contact" id="contact" method="post" action=' . $_SERVER['PHP_SELF'] . '> <label for"Nume">Name:</label><br /> <input name="nume" type="text" id="nume" value="'.$nume.'" maxlength="50"><br /> <label for="Email">E-mail:</label><br /> <input name="email" type="text" id="email" value="'.$email.'" maxlength="50"><br /> <label for="Phone">Phone:</label><br /> <input name="telefon" type="text" id="telefon" value="'.$telefon.'" maxlength="15"><br /> <label for="Message">Message:</label><br /> <textarea name="mesaj" cols="35" rows="3" wrap="virtual" id="mesaj">'.$mesaj.'</textarea><br /> <input type="submit" name="Submit" value="Trimite"><br /> </form> '. $nume . $email . $telefon . $mesaj .' <div class="success" style="display:none;">Client has been added.</div> <div class="contact_details" style="float: left; margin-top: -220px; margin-left: 210px;"><b>British Director: Stephen Smyth <br /> Mobile Phone: 0720 613 513<br /> Romanian Director: Marius Voicea <br /> Mobile Phone: 0723 560 719 <br /> Address: Str. 30 Decembrie Nr. 1 Urlati, Jud. Prahova Phone: 0372 746 773</b> </div> </fieldset> <iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps/ms?ie=UTF8&hl=en&t=h&msa=0&msid=117426025458241534188.0004746603cb3fbf4da2a&ll=44.996292,26.228807&spn=0.002655,0.00456&z=17&output=embed"></iframe><br /><small>View <a href="http://maps.google.com/maps/ms?ie=UTF8&hl=en&t=h&msa=0&msid=117426025458241534188.0004746603cb3fbf4da2a&ll=44.996292,26.228807&spn=0.002655,0.00456&z=17&source=embed" style="color:#0000FF;text-align:left">Urlati Ecopoly</a> in a larger map</small> </div>'; // se returneaza codul html pentru formularul care trebuie afisat return $formular; } /* daca a fost incarcata prima data aceasta pagina de catre vizitator se afiseaza formularul normal */ if (!isset($_POST['nume'])) { echo afisare_formular(1); } /* daca a fost deja apasat butonul te trimitere din formular se preiau datele trimise si se verifica daca sunt corecte */ else { // se preiau datele trimise $nume = $_POST['nume']; $email = $_POST['email']; $telefon = $_POST['telefon']; $mesaj = $_POST['mesaj']; // se verifica daca sunt corecte $verificare = 0; if (empty($nume)) { $verificare = 1; echo '<br>Nu a fost specificat Numele si prenumele.'; } if (strlen($nume) < 3) { $verificare = 1; echo '<br>Numele trebuie sa contina minim 3 caractere.'; } elseif (!eregi('[a-zA-Z ]{3}', $nume)) { $verificare = 1; echo '<br>Numele trebuie sa contina minim 3 caractere.'; } if (empty($email)) { $verificare = 1; echo '<br>Nu a fost introdusa adresa de e-mail'; } if (!eregi("^[a-z0-9\._-]+@+[a-z0-9\._-]+\.+[a-z]{2,4}", $email)) { $verificare = 1; echo '<br>Adresa de e-mail este incorecta.'; } if (empty($telefon)) { $verificare = 1; echo '<br>Nu a fost specificat un numar de telefon. Scrieti (-) daca nu aveti telefon.'; } if (empty($mesaj)) { $verificare = 1; echo '<br>Nu a fost specificat mesajul pe care doriti sa il trimiteti.'; } /* daca in urma verificarilor de mai sus a aparut o eroare atunci variabila de verificare ar trebui sa aiba valoarea 1 si in acest caz se afiseaza din nou formularul cu campurile deja completate pentru corectare */ if ($verificare == 1) { echo afisare_formular(0); } /* daca in urma verificarilor de mai sus totul este ok se trimite mesajul pe e-mail */ else { // se stabilesc variabilele care se vor trimite prin mail $subiect = 'Mesaj de la '.$_SERVER['SERVER_NAME']; // aici scrieti adresa de e-mail unde doriti sa primiti mesajele $adresa = 'digitals.future@yahoo.com'; $continut = '<br>Nume si prenume: '.$nume.' <br>Adresa de e-mail: '.$email.' <br>Telefon: '.$telefon.' <br>Mesaj:<br><br>'.$mesaj.' <br>Mesajul a fost trimis la data de '.date('d-m-Y H:i', time()); $headere = "From: $nume <$email>\r\n". "Reply-To: $email\r\n". "MIME-Version: 1.0\r\nContent-type: text/html; charset=iso-8859-2\r\n"; "X-Mailer: PHP/" . phpversion();; // aici se incearca trimiterea mesajului pe mail if (@mail($adresa, $subiect, $continut, $headere)) { echo '<META HTTP-EQUIV = "Refresh" Content = "1; URL =http://www.digitalupdates.co.cc"> Mesajul a fost trimis cu succes. Asteptati pentru redirectare.'; } else { echo '<META HTTP-EQUIV = "Refresh" Content = "1; URL =http://www.digitalupdates.co.cc"> A aparut o eroare la serverul de mail, va rugam sa incercati din nou.<br> Asteptati pentru redirectare.'; } } } ?> error: Parse error: syntax error, unexpected T_STRING in /home/ceoupdat/public_html/templates/contact.php on line 1 can someone help me please?
-
hello i'm building a website and i have a new folder structure on it which require apache htaccess files the first file should redirect to public_html folder and the second one should be used for loading all pages inside of index.php and the link should be the form of index.php?url=home&lang=en can you please check it out and see if it's done correctly ? thank you very much this file goes inside of public_html file and it's for redirecting all the calls to index.php and load pages there. <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} -f RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.*)$ index.php?url=$1 [PT,L] </IfModule> this code is for redirecting to public html <IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^$ public_html/ [L] RewriteRule (.*) public_html/$1 [L] </IfModule> oh i alomost forgot i don't know if i have url rewriting on it i'm beginner to htaccess files....
-
here you go my entire javascript $(function() { $('.text1').load("public_html/themes/en/content/home.php"); $('#header li a').click(function() { var url_to_load; var custom_handler = function(){}; var toLoad = $(this).attr("href"); switch(toLoad) { case "#home" : url_to_load = "public_html/themes/en/content/home.php";break; case "#products" : url_to_load = "public_html/themes/en/content/pro.php";break; case "#buy" : url_to_load = "public_html/themes/en/content/buy.php";break; case "#waste" : url_to_load = "public_html/themes/en/content/waste.php";break; case "#credentials" : url_to_load = "public_html/themes/en/content/credentials.php";break; case "#gallery" : url_to_load = "public_html/themes/en/content/gallery.php"; custom_handler = function(){$('.photo a').lightBox();}; break; case "#howto" : url_to_load = "public_html/themes/en/content/howto.php";break; case "#quality" : url_to_load = "public_html/themes/en/content/quality.php";break; case "#contact" : url_to_load = "public_html/themes/en/content/contact.php"; custom_handler = function() { $("#contact").live('submit', function() { // we want to store the values from the form input box, then send via ajax below var nume = $('#nume').attr('value'); var telefon = $('#telefon').attr('value'); var email = $('#email').attr('value'); var mesaj = $('#mesaj').attr('value'); console.log("$.ajax"); $.ajax({ type: "POST", url: "public_html/themes/en/content/contact.php", data: "nume="+ nume +" & telefon="+ telefon +" & email="+ email +" & mesaj="+ mesaj, success: function(){ $('form#contact').hide(); $('div.success').fadeIn(); } // end of success function }); // end of ajax return false; }); // end of submit function }; // end of custom handler function break; } // end of switch $(".text1").hide(); $("#content").slideDown(400); $(".text1").load(url_to_load,custom_handler); $(".text1").fadeIn(2000); }); });
-
Hello i've build a contact form and ajaxed a little bit without ajax(using it to submit data) works perfect but now since i've implemented ajax in it it says that the email address isn't correct can someone take a look over the php code on the line <php if (!eregi("^[a-z0-9\._-]+@+[a-z0-9\._-]+\.+[a-z]{2,4}$", $email)) { $verificare = 1; echo '<br>Adresa de e-mail este incorecta.'; } ?> and tell me if the regex is correct? after submit the data using ajax it keeps echo the error Adresa de e-mail este incorecta in translation the e-mail is not valid. entire code: <?php // se creaza o functie care afişeaza formularul function afisare_formular($stare=1) { /* daca valoarea variabilei $stare este 1 atunci se afiseaza formularul normal si se seteaza valorile din formular la 0 */ if ($stare == 1) { $nume = ''; $email = ''; $telefon = ''; $mesaj = ''; } /* daca valoarea variabilei $stare este diferita de 1 atunci se preiau mai intai datele trimise anterior prin POST din formular si se afiseaza formularul din nou dar cu valorile primite. */ else { $nume = $_POST['nume']; $email = $_POST['email']; $telefon = $_POST['telefon']; $mesaj = $_POST['mesaj']; } // se genereaza variabila cu tabelul care contine formularul $formular = ' <div class="contact_form"> <fieldset> <form name="contact" id="contact" method="post" action=""> <label for"Nume">Name:</label><br /> <input name="nume" type="text" id="nume" value="'.$nume.'" maxlength="50"><br /> <label for="Email">E-mail:</label><br /> <input name="email" type="text" id="email" value="'.$email.'" maxlength="50"><br /> <label for="Phone">Phone:</label><br /> <input name="telefon" type="text" id="telefon" value="'.$telefon.'" maxlength="15"><br /> <label for="Message">Message:</label><br /> <textarea name="mesaj" cols="35" rows="3" wrap="virtual" id="mesaj">'.$mesaj.'</textarea><br /> <input type="submit" name="Submit" value="Trimite"><br /> </form> '. $nume . $email . $telefon . $mesaj .' <div class="success" style="display:none;">Client has been added.</div> </fieldset> </div>'; // se returneaza codul html pentru formularul care trebuie afisat return $formular; } /* daca a fost incarcata prima data aceasta pagina de catre vizitator se afiseaza formularul normal */ if (!isset($_POST['nume'])) { echo afisare_formular(1); } /* daca a fost deja apasat butonul te trimitere din formular se preiau datele trimise si se verifica daca sunt corecte */ else { // se preiau datele trimise $nume = $_POST['nume']; $email = $_POST['email']; $telefon = $_POST['telefon']; $mesaj = $_POST['mesaj']; // se verifica daca sunt corecte $verificare = 0; if (empty($nume)) { $verificare = 1; echo '<br>Nu a fost specificat Numele si prenumele.'; } if (strlen($nume) < 3) { $verificare = 1; echo '<br>Numele trebuie sa contina minim 3 caractere.'; } elseif (!eregi('[a-zA-Z ]{3}', $nume)) { $verificare = 1; echo '<br>Numele trebuie sa contina minim 3 caractere.'; } if (empty($email)) { $verificare = 1; echo '<br>Nu a fost introdusa adresa de e-mail'; } if (!eregi("^[a-z0-9\._-]+@+[a-z0-9\._-]+\.+[a-z]{2,4}$", $email)) { $verificare = 1; echo '<br>Adresa de e-mail este incorecta.'; } if (empty($telefon)) { $verificare = 1; echo '<br>Nu a fost specificat un numar de telefon. Scrieti (-) daca nu aveti telefon.'; } if (empty($mesaj)) { $verificare = 1; echo '<br>Nu a fost specificat mesajul pe care doriti sa il trimiteti.'; } /* daca in urma verificarilor de mai sus a aparut o eroare atunci variabila de verificare ar trebui sa aiba valoarea 1 si in acest caz se afiseaza din nou formularul cu campurile deja completate pentru corectare */ if ($verificare == 1) { echo afisare_formular(0); } /* daca in urma verificarilor de mai sus totul este ok se trimite mesajul pe e-mail */ else { // se stabilesc variabilele care se vor trimite prin mail $subiect = 'Mesaj de la '.$_SERVER['SERVER_NAME']; // aici scrieti adresa de e-mail unde doriti sa primiti mesajele $adresa = 'digitals.future@yahoo.com'; $continut = '<br>Nume si prenume: '.$nume.' <br>Adresa de e-mail: '.$email.' <br>Telefon: '.$telefon.' <br>Mesaj:<br><br>'.$mesaj.' <br>Mesajul a fost trimis la data de '.date('d-m-Y H:i', time()); $headere = "From: $nume <$email>\r\n". "Reply-To: $email\r\n". "MIME-Version: 1.0\r\nContent-type: text/html; charset=iso-8859-2\r\n"; "X-Mailer: PHP/" . phpversion();; // aici se incearca trimiterea mesajului pe mail if (@mail($adresa, $subiect, $continut, $headere)) { echo '<META HTTP-EQUIV = "Refresh" Content = "10; URL =index.php"> Mesajul a fost trimis cu succes. Asteptati pentru redirectare.'; } else { echo '<META HTTP-EQUIV = "Refresh" Content = "10; URL ='.$_SERVER['PHP_SELF'].'"> A aparut o eroare la serverul de mail, va rugam sa incercati din nou.<br> Asteptati pentru redirectare.'; } } } ?>
-
Yes, someone knows how to embed an FLV flash into a website. Have you tried Google? ok i will keep search... i've searched until now .. but couldn't find anything.. that would help me.
-
Hello does anyone know's how to embed flv files on a website?
-
still didn't work :|
-
Notice: Undefined index: rows in C:\x\xampp\htdocs\test\upload.php on line 4 and for do_upload.php Notice: Undefined index: Rows in C:\x\xampp\htdocs\test\do_upload.php on line 5 Notice: Undefined index: pic1 in C:\x\xampp\htdocs\test\do_upload.php on line 16
-
sorry i`m just in hurry and i`m mad cuz it's not working forgot to tell what and how.. yes single // multiple upload // thumbail generation doesn't work and i get zip no error i don't know why ~X(
-
Hello i`ve build a small upload form with a thumbnail script in it but doesn't work and i don't know why can someone check it out please? upload.php <?php session_start(); if (!$_SESSION['rows']) $_SESSION['rows']=1; ?> <form action="do_upload.php" method="post" enctype="multipart/form-data" name="form" id="form"> <table width="800" border="1" align="center" cellpadding="3" cellspacing="2" bordercolor="#999999"> <?php for ($i=1; $i<=$_SESSION['rows']; $i++) { ?> <tr> <td bgcolor="#D6D6D6">Poza <?=$i;?>:</td> <td bgcolor="#D6D6D6"><input name="pic<?=$i;?>" type="file" id="pic<?=$i;?>" /></td> </tr> <?php } ?> <tr> <td width="150" bgcolor="#D6D6D6"><input name="Rows" type="submit" class="buton" id="Rows" value="+" /> <input name="Rows" type="submit" class="buton" id="Rows" value="-" /></td> <td width="650" bgcolor="#D6D6D6"><input name="Upload" type="submit" class="buton" id="Upload" value="Upload" /></td> </tr> </table> </form> do_upload.php <?php session_start(); if ($_POST['Rows']) { if ($_POST['Rows']=="+") $_SESSION['rows']++; if ($_POST['Rows']=="-") $_SESSION['rows']--; header("Location: upload.php"); exit; } if ($_POST['Upload']=="Upload") { for ($z=1; $z<=$_SESSION['rows']; $z++) { $curent="pic$z"; if ($_FILES[$curent]['name']!="") { $new_name="image_".md5(date("U")); $new_name_small="$new_name"."_thumbs.jpg"; $thumb_size=250; list($width, $height, $type) = getimagesize($_FILES[$curent]['tmp_name']); $type = image_type_to_extension($type); $img_file = "$new_name".".jpg"; $upload_file = $img_file.basename($_FILES[$curent]['$new_name']); move_uploaded_file($_FILES[$curent]['tmp_name'], $upload_file); $img_ratio=$width/$height; if ($img_ratio>1){ $new_width = ($thumb_size<$width)?$thumb_size:$width; $new_height =$new_width/$img_ratio; }else{ $new_height = ($thumb_size<$width)?$thumb_size:$height; $new_width = $new_height*$img_ratio; } if ($type==".jpeg") $source = imagecreatefromjpeg($upload_file); if ($type==".png") $source = imagecreatefrompng($upload_file); if ($type==".gif") $source = imagecreatefromgif($upload_file); $thumb = imagecreatetruecolor($new_width, $new_height); imagecopyresampled($thumb, $source, 0, 0, 0, 0, $new_width, $new_height, $width, $height); imagejpeg($thumb, "$new_name_small" , 100); $poze.="$new_name, "; } sleep(1); } } ?>
-
problem solved.
-
Hello i`m coding a small header that i want to be 100% width but i`ve made it on 960px and i can't manage putin all the three part togther in a wrapper can someone please help? <body> <div id="header"> <div id="left"></div> <div id="center"></div> <div id="right"</div> </div> and css body { margin: 0px; padding: 0px; } #header { } #header #left { background-image: url(../images/index_02.png); background-repeat: no-repeat; height: 108px; width: 308px; } #header #center { background-image: url(../images/index_03.png); background-repeat: no-repeat; height: 150px; width: 290px; float: left; } #header #right { background-image: url(../images/index_02.png); background-repeat: no-repeat; height: 108px; width: 308px; float: right; }
-
yes i've googled and found out that it is not very supported too bad:( because.. it is very useful. wasn't sure... and needed the advice of someone who know's more thank you.
-
Hello recently i've read on a blog about a layout coding technique using diplay as table.. it's been a long time since i've coded in css but should i use that technique or stay on the older coding style ?
-
hmm ur a better google seacher then i me i was writing dilenia upc font not dileniaupc font thank you very much for you help i apreciate
-
Hello i`m searching for Dilenia UPC font if anyone has it can you share please ? i really need it thank you very much.
-
ok thank you very much i will have a look on both tutorials.
-
i`m back i have made the changes in the code where i needed but i need some experts who used before preg_match since it's my first time.. and i would to know if it's correct. <?php if (isset($_POST['submit'])) { if (empty($_POST['username'])) { $errors[] = 'Empty Username.'; } if (strlen($_POST['username']) < 4) { $errors[] = 'Username too short.'; } if (strlen($_POST['username']) > 10) { $errors[] = 'Username too long.'; } if (!preg_match('^[a-zA-Z0-9]*$', $_POST['username'])) { $errors[] = 'Username Contains Invalid Characters.'; } if (empty($_POST['password'])) { $errors[] = 'Empty Password'; } if (strlen($_POST['password']) < 6) { $errors[] = 'Password too short'; } if (!preg_match('^[a-zA-Z0-9]*$', $_POST['username'])) { $errors[] = 'Password Contains Invalid Characters.'; } if (empty($_POST['name']) || !preg_match('^[a-zA-Z0-9]*$', $_POST['name'])) { $errors[] = 'Name is empty or incorect.'; } if (empty($_POST['surname']) || !preg_match('^[a-zA-Z0-9]*$', $_POST['surname'])) { $errors[] = 'Surname is empty or incorect.'; } if (empty($_POST['address']) || !preg_match('^[a-zA-Z0-9]*$', $_POST['address'])) { $errors[] = 'Adress is empty or incorect.'; } if (empty($_POST['email']) || !preg_match('^[a-z0-9\._-]+@+[a-z0-9\._-]+\.+[a-z]{2,4}$', $_POST['email'])) { $errors[] = 'E-mail is empty or incorect.'; } if (empty($_POST['zipcode']) || !preg_match('^[0-9]*$', $_POST['zipcode'])) { $errors[] = 'Zip Code is empty or incorect.'; } if (empty($_POST['phone']) || !preg_match('^[0-9]*$', $_POST['phone'])) { $errors[] = 'Phone is empty or incorect.'; } $username = $_POST['username']; $sql = "SELECT * FROM `tbl_users` WHERE `username_users` = '$username' "; $result = mysql_query($sql); if(mysql_num_rows($result) > 0) { $errors[] = 'Username Exists.'; } if(count($errors) < 1) echo "Processing..."; } ?> <form id="loginform" method="post" action="<?php $_SERVER['PHP_SELF']; ?>"> <fieldset> <legend> Register </legend> <p> <?php if (isset($errors)) { if (count($errors)) { $error_string = implode('</li><li>', $errors); echo $error_string = " <div class='form_errors'> The following errors were encountered while processing your request: <ul><li>{$error_string}</li></ul> </div>"; } } ?> </p> <label for="username"> <input name="username" tabindex="1" id="username" type="text" value="">Username: </label> <label for="password"> <input name="password" tabindex="2" id="password" type="password" value="">Password: </label> <label for="Name"> <input name="name" tabindex="3" id="name" type="text" value="">Name: </label> <label for="Surname"> <input name="surname" tabindex="4" id="surname" type="text" value="">Surname: </label> <label for="address"> <input name="address" tabindex="5" id="address" type="text" value="">Address: </label> <label for="email"> <input name="email" tabindex="6" id="email" type="text" value="">Email: </label> <label for="phone"> <input name="phone" tabindex="7" id="phone" type="text" value="">Phone: </label> <label for="zipcode"> <input name="zipcode" tabindex="8" id="zipcode" type="text" value="">Zip Code: </label> <label for="city"> <input name="city" tabindex="9" id="city" type="text" value="">City: </label> <label for="submit"> <input name="submit" id="submit" tabindex="4" value="Log in" type="submit"> </label> </fieldset> </form>
-
hello since php 5.3 eregi is deprecated can you please advice me what function should i use instead and give an example ? thank you very much
-
i don't exacly how it's made can someone give me an ideea ?
fantomel replied to fantomel's topic in Application Design
reinventing the wheel it's not one of my dreams i prefer it my way but if it's required probably sometime i will do it -
thank you very much for you help it gave me an illumination one night with out sleep it's just killing me.. this should be the second night..
-
hello i'm having some troubles with a form can someone help me ? i want to output some errors in a certain place. but i can't manage do it:( <?php function show_register() { $error_string = ''; echo '<form id="loginform" method="post" action=""> <fieldset> <legend> Register </legend> <p> '. $error_string.' </p> <label for="username"> <input name="username" tabindex="1" id="username" type="text">Username: </label> <label for="password"> <input name="password" tabindex="2" id="password" type="password">Password: </label> <label for="Name"> <input name="name" tabindex="3" id="name" type="text">Name: </label> <label for="Surname"> <input name="surname" tabindex="4" id="surname" type="text">Surname: </label> <label for="address"> <input name="address" tabindex="5" id="address" type="text">Address: </label> <label for="email"> <input name="email" tabindex="6" id="email" type="text">Email: </label> <label for="phone"> <input name="phone" tabindex="7" id="phone" type="text">Phone: </label> <label for="zipcode"> <input name="zipcode" tabindex="8" id="zipcode" type="text">Zip Code: </label> <label for="city"> <input name="city" tabindex="9" id="city" type="text">City: </label> <label for="submit"> <input name="submit" id="submit" tabindex="4" value="Log in" type="submit"> </label> </fieldset> </form>'; } if(isset($_POST['submit'])) { $errors = array(); $valid = 0; if(empty($_POST['username'])) { $valid = 1; $errors['username'] = "Empty Username Field"; } if(count($errors) > 0) { global $error_string; $error_string = implode('</li><li>', $errors); $error_string = " <div class='form_errors'> The following errors were encountered while processing your request: <ul><li>{$error_string}</li></ul> </div> "; show_register($errors); } else { processform(); } } else { show_register(); } function processform() { echo "Registered"; } ?> ok where i have if(count($errors) > 0 .. i would like that output to be inside the form after validation but i`m a little tired and i'm escaping something in the logical part. i would require some assistance.
-
i don't exacly how it's made can someone give me an ideea ?
fantomel replied to fantomel's topic in Application Design
same question i asked my self why would someone want's a clone of that website i don't like it at all.