1
abdala
PHP Help
  • 2003/10/9 15:36

  • abdala

  • Just popping in

  • Posts: 42

  • Since: 2003/2/5 1


Hi,

Quick PHP question if that's allowed:

I want to write the following in PHP but I don't know how since I don't know much PHP at all. In a table cell, I wanna do the following:

if ((address in address bar)==("string1")){
echo "string2";
}

How would I code this in PHP?

Thanks,
Abdala

2
lykoszine
Re: PHP Help
  • 2003/10/9 15:51

  • lykoszine

  • Module Developer

  • Posts: 244

  • Since: 2002/1/2 2


Not a hundred percent sure howto get the address/path of the file off by heart, should be easy to find at php.net though

You cannot == strings, you need to use strcmp or something. (look that up also...)

How's that for some unhelpful help?

3
Draven
Re: PHP Help
  • 2003/10/9 16:29

  • Draven

  • Module Developer

  • Posts: 337

  • Since: 2003/5/28


What part of the address are you trying to retrieve? Are you trying to get just a passed variable like ?this=that out of it? Or an entire URL like http://www.yourdomain.com. Or just the calling script index.php? Can you be a little more specific?

4
abdala
Re: PHP Help
  • 2003/10/9 16:52

  • abdala

  • Just popping in

  • Posts: 42

  • Since: 2003/2/5 1


Hi,

What I am actually trying to is in the news module to separate the story title from the topic title. I managed to do that. Now, when I go to the index page of that specific topic, it lists the titles of the stories, but it is not obvious what the topic title is. So, I was thinking of checking the address (entire URL) in the address bar and hardcoding the story title in a different place in the page. Talk about terrible coding practice! that's how much I know though!

Another thing, I would love to be able to do what you did in your website, gaining-mass, collect stories of separate topics in separate blocks.

Thanks in advance,
Abdala

5
abdala
Re: PHP Help
  • 2003/10/15 16:45

  • abdala

  • Just popping in

  • Posts: 42

  • Since: 2003/2/5 1


Hi Draven,

I would be really really thankful if you can answer my questions in the previous posting in this thread.

Thanks,
Abdala

Login

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits