html - some simple question in php -


i have simple question. 1-how can change php pages in specify points? example

if($flag) //go 1.php else  // go 2.php 

what replace instead go ?.php

2-

<form action="index.php" method="post"> <input type="button" name ="submit" value="comfirm"> 

if click on button index.php execute if there way in particular condition want index.php called

for example have 2 text fields , button user must fill both of text , click on button until goes next pages if user fill 1 of text in must not go in second way index.php must not called.

if ($flag) {     header("location:1.php");     exit(0); } else {     header("location:2.php");     exit(0); } 

for second question can either use javascript (not users have javascript enabled, it's not guaranteed work), , check value of fields, or hava serversite check , redirect user header, above.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -