Fenerli Fenerli - 1 year ago 85
PHP Question

Action of forum doesn't get ID

I have this set in top of page

if (isset($_GET["edit"]) and !empty($_GET["edit"])) {

and then i do this with my action on the topbar it shows the number of

but if i do ""view source" i see this:

enter image description here

<form class="form" action="categories.php<?=((isset($_GET['edit']))?'?edit=.$edit_id':'');?>" method="post">

Why is it not getting the

Answer Source

because you are setting it as a literal string. try

action="categories.php<?php echo (isset($_GET['edit'])) ? '?edit='.$edit_id :'');?>"
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download