Click here to Skip to main content
15,071,921 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to update the database.I pass reference id in link for file updates.php but it's showed page not found and in url show this error for id[^]

What I have tried:

I tried this code
<pre><a href="<?php echo site_url('/updates.php?updd=<?php echo $id; ?>'); ?> );  ?>" name="update">Update</a>
Updated 4-Jan-21 0:37am

1 solution

<?php echo site_url('/updates.php?updd=<?php echo $id; ?>'); ?> );  ?>

This doesn't look like valid PHP, you've nested two <?php echo statements unnecessarily. You only need one of these statements, and then to parse and include the $id variable within the URL you need to use double-quotes in the string, as so:
<?php echo site_url("/updates.php?updd=$id"); ?>

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900