Jump to content

Thalantyr

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Thalantyr's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi there, first time poster. I'm only new to PHP, and i'm having some trouble getting my head around how to properly edit an SQL row with PHP. Basically the page i'm designing is a member list for gaming which I want stored in a database. I know the basics of addings & viewing sql data, but editing & deleting has got me stumped. From what I can tell, I need to post back to the same page using CMD= and then based IF statements on what the URL is. Now that probably sounds simple to all of you, but I can't get it to work. I think my main problem is that i'm including 4 different PHP pages for different ranks. Is there some way I can create an array for each rank so I only need 1 x PHP page? Eg: Leaders, Core Members, Full Members, New Members I've currently got one page called memberlist_admin.php and it includes memberlist_leaders_edit.php, memberlist_coremembers_edit.php, etc... Those files basically have the code to say if(!isset($cmd)) { then do this block of code, which DOES work, and displays an EDIT link / DELETE link for me. The second I add the second statement in, which is along the lines of if($_GET["cmd"]=="edit" || $_POST["cmd"]=="edit") { if (!isset($_POST["submit"])) { then things really start to just not work, and the errors are along the lines of Parse error: syntax error, unexpected $end in /home/********/public_html/********/memberlist_leaders_edit.php on line 97. Where should I start? What's the best tutorial out there (besides Spoono, which I get lost it quite quick)? Thankyou. Greg Bennett.
×
×
  • 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.