PHP question | xltronic messageboard
 
You are not logged in!

F.A.Q
Log in

Register
  
 
  
 
(nobody)
...and 388 guests

Last 5 registered
Oplandisks
nothingstar
N_loop
yipe
foxtrotromeo

Browse members...
  
 
Members 8025
Messages 2614103
Today 0
Topics 127542
  
 
Messageboard index
PHP question
 

offline horsefactory from 💠 (United Kingdom) on 2004-05-26 05:01 [#01208012]
Points: 14867 Status: Regular



This is probably really dumb but I don't think I am looking
at it the right way at all. What I need to do is perform an
SQL (delete row) query by clicking on a link. I have the php
function defined for the database connection and the query
and stuff but I don't get how I can execute it when I click
a link. If I have it in a file, say 'delete.php' and link to
that, what is the syntax and how can I pass a parameter to
it (to specify which row needs to be deleted) ?

Any help is appreciated, thanks.


 

offline Drunken Mastah from OPPERKLASSESVIN!!! (Norway) on 2004-05-26 05:12 [#01208018]
Points: 35867 Status: Lurker | Show recordbag



I think you'll need to do it by either having the link point
to "yourfile.php?delete=yes" and have the script detect
whether or not $delete is set, or you'll have to use a form.


 

offline aphextriplet from your mothers bedroom (United Kingdom) on 2004-05-26 05:14 [#01208021]
Points: 4731 Status: Lurker



you should be able to find apt code online, it'll just have
little comments on where to input your personal data eg
database name etc.


 

offline horsefactory from 💠 (United Kingdom) on 2004-05-26 05:21 [#01208036]
Points: 14867 Status: Regular



Ah, I've done it. Made the link point to
'delete.php?del=$key. Thanks guys.


 

offline aphextriplet from your mothers bedroom (United Kingdom) on 2004-05-26 05:22 [#01208039]
Points: 4731 Status: Lurker



i didnt really help, moreover tried to look clever by
pretending to help. That's why i teach.


 

offline Drunken Mastah from OPPERKLASSESVIN!!! (Norway) on 2004-05-26 05:22 [#01208043]
Points: 35867 Status: Lurker | Followup to horsefactory: #01208036 | Show recordbag



I've had trouble with that myself a few times.. I couldn't
figure out how to point a LINK instead of a form to make a
difference on a script, but the answer is so simple, really.


 


Messageboard index