Jump to content

Passing variables with links?


Steppio

Recommended Posts

I do apologise to the people i keep creating these problems for, i do realise i should be trying my best to solve these problems myself but the project i'm working on is my php 'cherry', and i've made it well too difficult by accident. If anybody can help me with this problem i'd be happy, its probably a very simple one to you, but to me its a perplexing mystey:

 

echo '<br /><a href="deleteid.php$id">Delete</a>';

 

The code pulls out a number of variables from the database, one is called $ID, which i would like to pass to a page called deleteid.php, is there anyway i can do this? To begin with i was using a seperate custom function to fish out the $id and delete the records content based on that integer, but i couldnt figure out how to make a link that ran a function as opposed to a link. Any comments would be massively helpful, like i say, im a bit of an idiot.

Ste

Link to comment
Share on other sites

Thanks, i think that works but i keep getting this error message:

 

Error performing query: Unknown table 'newsuser' in MULTI DELETE

 

I've checked the error on google, but the only relevant article i could find on it was a problem with deleting multiple table alias' at once, i only want to delete a row of info from the table based on the ID.

 

Any ideas?

Link to comment
Share on other sites

That sounds like a database error.  Can you post your deleteid.php script?

 

Edit: Oops, I mangled my my first message.  What I meant was that you had "a href" at the start, but "url" at the end.  "a href" is from HTML, but "url" is the code used on forums.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.