Fenerli Fenerli - 8 months ago 54
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


because you are setting it as a literal string. try

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