SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: A little Help

  1. #1
    SitePoint Addict
    Join Date
    Jun 2005
    Posts
    294
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    A little Help

    I am writing my news.php completly in one file
    M1-6

    I am at the part where I must EDIT the news. when the script if first accessed it displayed all the news in a table that's included within the php. That table has to undefined links 'Edit News' and 'Delete News'. m3 is the FORM in which the data is displayed for editing and m4 is the SQL Update section. My question is...How do I get my link Edit News to point to not m=3 but also id='whatever the new id is...

    news.php?m=3$id=12

    Do I just set the link to $id?

  2. #2
    SitePoint Wizard mark_W's Avatar
    Join Date
    Mar 2004
    Location
    West Midlands, United Kingdom
    Posts
    2,631
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That should work but you dont need the $

  3. #3
    SitePoint Guru dbevfat's Avatar
    Join Date
    Dec 2004
    Location
    ljubljana, slovenia
    Posts
    684
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you need & instead

  4. #4
    SitePoint Addict
    Join Date
    Jun 2005
    Posts
    294
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I used
    Code:
    <a href=\"" . $_SERVER['PHP_SELF'] ."?m=3&id=" . $r[id] . "\">Edit Post</a>
    The right now I am trying to make the form to edit display with the information in the correct fields..Any suggestions? Should I set the field names to $title,$user,$message and so forth?

  5. #5
    SitePoint Addict
    Join Date
    Jun 2005
    Posts
    294
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nevermind figured that out too! Thanks a lot!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •