-1

I have to pass an ID in tag to two different pages.

My current code is:

<a href="select1.php?id=<?php echo $cval['id']?>">Edit</a>

I need to pass to select1.php and select2.php

Trying to do something like

<a href="select1.php?id=<?php echo $cval['id']?> && select2.php?id=<?php echo $cval['id']?>">Edit</a>

I tried this . But it doesnt solve my issue.

jumbo
  • 9
  • 1
  • 6

3 Answers3

0
<p><a href="#" onclick="window.open('http://google.com');
    window.open('http://yahoo.com');">Click to open Google and Yahoo</a></p>

Do note that this will be blocked by popup blockers built into web browsers but you are usually notified of this

BhAvik Gajjar
  • 473
  • 3
  • 19
0

Try this

<a href="#" onclick="window.open('http://yoursite.com/select1.php?id=<?php echo $cval['id']?>');
window.open('http://yoursite.com/select2.php?id=<?php echo $cval['id']?>');">Edit</a>
Syam Mohan M P
  • 1,047
  • 8
  • 23
0

You can try the following-

<a target="_blank" onclick="window.open('select1.php?id=<?php echo $cval['id']?>;');  window.open('select2.php?id=<?php echo $cval['id']?>;');">Edit</a>

There will be a pop-up blocker while trying to open two windows so you need to set this on allow

Anshu Sharma
  • 162
  • 13