0

This works:

searchR.php?status=pending

and this works:

searchR.php?status=rerun

but this doesn't (lists only "pending"):

searchR.php?status=pending&rerun

I am aiming to build a query that will list records from both terms ("pending" and "rerun")

What should the URL look like?

gungu
  • 161
  • 1
  • 1
  • 9

3 Answers3

0

Use the ampersand to introduce a new variable and parameter to the url. example

searchR.php?status=$pending&rerun=$running
0
searchR.php?status=pending&rerun 

gives you status=pending and rerun=null

searchR.php?status=pending&status=rerun

gives the last value status=rerun

searchR.php?status[]=pending&status[]=rerun

will give ayrrya $_GET['status'] = [pending,rerun];

splash58
  • 26,043
  • 3
  • 22
  • 34
0

the sending page

searchR.php?status=pending|rerun

the receiving page

$Recordset1 = $_GET['status']; 
$query = ("SELECT * FROM sampleOA WHERE status REGEXP '$Recordset1' ");

i used the "REGEXP" expression to achieve the objective in the question

gungu
  • 161
  • 1
  • 1
  • 9