Jump to content

Tyka95

New Members
  • Posts

    3
  • Joined

  • Last visited

Tyka95's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thank you so much guys... I just start to study PHP..I gonna try to do my best!! ginerjm, I just say that I'm learning some tutorials but i don't put that code in my code because Is fails, and i think I must read and find something different to understant the method.. ..
  2. I work on it.. I read and follow some tutorials... But something goes wrong
  3. My code: <!DOCTYPE html> <html> <head> <title></title> </head> <body> <?php if (!isset($_REQUEST['start'])) { ?> <form action="<?php $_SERVER['SCRIPT_NAME']?>" method="post"> <p><label> Login: <input name="login" type="text" size="15" /></label></p> <p><label>Password: <input type="password" name="parola"></label></p> <p><label>Emailul dvs:<input type="email" name="email"></label></p> <p><label>Lasati mai jos mesajul dvoastra: <br /> <textarea name="mesaj" cols="50" rows="6" placeholder="Scrieti aici ceva..."></textarea></label></p> <p><input type="reset" value="Anuleaza" /> <input type="submit" value="Transmite" name="start" /></p> </form> <?php } else { if (isset($_POST['login'])) $log=$_POST['login']; if (isset($_POST['mesaj'])) $mesaj=$_POST['mesaj']; if(isset($_POST['parola'])) $pass=$_POST['parola']; if(isset($_POST['email'])) $mail=$_POST['email']; $file=fopen('Homework.txt', "a+") or die ("Fisier inaccesibil!"); fwrite($file, $log); fwrite($file, " "); fwrite($file, $pass); fwrite($file, " "); fwrite($file, $mail); fwrite($file, " "); fwrite($file, $mesaj); fwrite($file, "\n"); fclose($file); echo 'Datele au fost salvate! Iata ce este in fisier: <br />'; $file=fopen("Homework.txt", "r") or die ("Fisier inaccesibil!"); while (!feof($file)) { echo fgets($file). "<br /><br /><br />"; } fclose($file); } ?> </body> </html> I just want the result looking like that: |Login | Password | Mail | Message | |John | Doe | johndoe@mail.com | Just a little text here. |
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.