Results 1 to 8 of 8

Thread: Replacing text by clicking a hyperlink using PHP

  1. #1
    Senior Member
    Join Date
    Aug 2004
    Location
    W Yorkshire
    Posts
    5,691
    Thanks
    85
    Thanked
    15 times in 13 posts
    • XA04's system
      • Motherboard:
      • MSI X570-A Pro
      • CPU:
      • AMD Ryzen 5 3600
      • Memory:
      • Corsair 2x 8gb DDR 4 3200
      • Storage:
      • 1TB Serpent M.2 SSD & 4TB HDD
      • Graphics card(s):
      • Palit RTX 2060
      • PSU:
      • Antec Truepower 650W
      • Case:
      • Fractcal Meshify C
      • Operating System:
      • Windows 10
      • Monitor(s):
      • iiyama 34" Curved UWQHD
      • Internet:
      • Virgin 100mb Fibre

    Replacing text by clicking a hyperlink using PHP

    Hey guys,
    I was wondering how to replace text using php. When you click a hyperlink, it refreshes the page with the new text, but it still been the same file, eg. file.php, but the hyperlink is something like blahblah.com/file.php?=link1. even though its the same file, it brings a different output for file.php?=link2, file.php?=link3 etc etc.

    Sorry i can't be more exact, its rather hard to explain.

    Thanks

  2. #2
    Senior Member
    Join Date
    Aug 2004
    Location
    W Yorkshire
    Posts
    5,691
    Thanks
    85
    Thanked
    15 times in 13 posts
    • XA04's system
      • Motherboard:
      • MSI X570-A Pro
      • CPU:
      • AMD Ryzen 5 3600
      • Memory:
      • Corsair 2x 8gb DDR 4 3200
      • Storage:
      • 1TB Serpent M.2 SSD & 4TB HDD
      • Graphics card(s):
      • Palit RTX 2060
      • PSU:
      • Antec Truepower 650W
      • Case:
      • Fractcal Meshify C
      • Operating System:
      • Windows 10
      • Monitor(s):
      • iiyama 34" Curved UWQHD
      • Internet:
      • Virgin 100mb Fibre
    bump thanks

  3. #3
    Senior Member
    Join Date
    Oct 2003
    Posts
    2,069
    Thanks
    4
    Thanked
    7 times in 3 posts
    I dont really follow...what affects whether its link1 link2 etc?
    Twigman

  4. #4
    Senior Member
    Join Date
    Aug 2004
    Location
    W Yorkshire
    Posts
    5,691
    Thanks
    85
    Thanked
    15 times in 13 posts
    • XA04's system
      • Motherboard:
      • MSI X570-A Pro
      • CPU:
      • AMD Ryzen 5 3600
      • Memory:
      • Corsair 2x 8gb DDR 4 3200
      • Storage:
      • 1TB Serpent M.2 SSD & 4TB HDD
      • Graphics card(s):
      • Palit RTX 2060
      • PSU:
      • Antec Truepower 650W
      • Case:
      • Fractcal Meshify C
      • Operating System:
      • Windows 10
      • Monitor(s):
      • iiyama 34" Curved UWQHD
      • Internet:
      • Virgin 100mb Fibre
    well. let me try explain again.

    i'll put it simply, so i can get a simple answer .

    you load up index.php and you get:
    "Welcome to the website". There is a hyperlink, that links to index.php?=link1, when you click it, it says "Welcome to link 1", etc etc.
    How do i do this?
    Just think of it as plain text, and i should be able to sort the rest out..

    Thanks

  5. #5
    Agent of the System ikonia's Avatar
    Join Date
    May 2004
    Location
    South West UK (Bath)
    Posts
    3,736
    Thanks
    39
    Thanked
    75 times in 56 posts
    try the book I recommended.

    I walks you through a basic understanding of php functions, including this sort of thing.

    you've asked a few questions on here, and as you've said you understand html pretty well I sort of get the impression you've got $something you want to do with php and your trying to just do it, instead of building up to it.

    I'm no php master infact I can't remember very much. But when I did work on a php test project the WROX press book really walked me through the basics and got me walking fast (not running) in a couple of days.
    It is Inevitable.....


  6. #6
    Senior Member
    Join Date
    Jul 2003
    Posts
    1,066
    Thanks
    1
    Thanked
    0 times in 0 posts
    Tbh there are a million ways of implementing that. ikonia makes a good point, work through a book and it will give you several options plus you'll increase your understanding of the language.

  7. #7
    Senior Member
    Join Date
    Aug 2004
    Location
    W Yorkshire
    Posts
    5,691
    Thanks
    85
    Thanked
    15 times in 13 posts
    • XA04's system
      • Motherboard:
      • MSI X570-A Pro
      • CPU:
      • AMD Ryzen 5 3600
      • Memory:
      • Corsair 2x 8gb DDR 4 3200
      • Storage:
      • 1TB Serpent M.2 SSD & 4TB HDD
      • Graphics card(s):
      • Palit RTX 2060
      • PSU:
      • Antec Truepower 650W
      • Case:
      • Fractcal Meshify C
      • Operating System:
      • Windows 10
      • Monitor(s):
      • iiyama 34" Curved UWQHD
      • Internet:
      • Virgin 100mb Fibre
    Ok, well i was just trying to get this thing sorted for my site. I read through a HTML book within a week, i went from knowing hardly nothing about HTML to knowing tons of things.

    I do have some PHP books of my brothers around, but i'll read through them later, i was just wondering how to do what i asked above^^^^^^^.

  8. #8
    Agent of the System ikonia's Avatar
    Join Date
    May 2004
    Location
    South West UK (Bath)
    Posts
    3,736
    Thanks
    39
    Thanked
    75 times in 56 posts
    read through your brothers books, it will probably come easy after that.
    It is Inevitable.....


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Nero vision express saying:'Burn process failed'
    By johnnr892 in forum Help! Quick Relief From Tech Headaches
    Replies: 15
    Last Post: 11-12-2005, 11:43 PM
  2. 3 free orange sims per address
    By daveham in forum Retail Therapy and Bargains
    Replies: 73
    Last Post: 16-02-2005, 01:26 AM
  3. Insert Hyperlink and Firefox
    By mike_w in forum HEXUS Suggestions
    Replies: 2
    Last Post: 22-08-2004, 09:56 AM
  4. Creating databases using PHP?
    By Nemeliza in forum Software
    Replies: 10
    Last Post: 22-11-2003, 10:45 PM

Posting Permissions

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