Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
how do i make a subroutine?

i wanna make something like script.cgi?action=add
 
I've never really heard to it as a subrouting, but... you could possibly do this:
script.php?action=add.

if ($action = 'add') {
// do add stuff
} else {
//do non-add stuff
}

 
if ($action = 'add') {
// do add stuff
} else {
//do non-add stuff
}

function is what to use as a sub routine (like in perl), correct? so how do i call a function command in the '// do add stuff' part
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top