Jump to content
php.lv forumi

errors


gaziks52

Recommended Posts

ir divi faili... index failā nospiž "submit" un tiek aizsūtīti dati uz register.php ... kā lai dabū erroru no register.php redirektējot uz index.php ja kautkas nav izdevies ??

index.php

<form action="register.php" method="post">
  <input type="text" name="text"/>
  <input type="submit" name="submit"/>
</form>

 

register.php

if(isset($_POST['submit'])) {
 if($_POST['text']!= bla bla) {
 header("Location: index.php");
 // errors ko parādīt index.php 
}

Edited by gaziks52
Link to comment
Share on other sites

×
×
  • Create New...