Jump to content

Please help.

- - - - -

  • Please log in to reply
13 replies to this topic

#1
kakai25

kakai25

    Newbie

  • Members
  • PipPip
  • 11 posts
Hi there.

I am junior programmer at Metromaniladirectory.com.
I dont have any experiences in php programming, just basics during my college.

METROMANILADIRECTORY.COM Directory Services

That's the url of what I'm going to do. Here's my problem.
The logos there must be clickable and when you click it, a webpage of the said company will be shown. What should I do? Please help me guys.

Another one is,

METROMANILADIRECTORY.COM Directory Services

The universities listed are not organized, my boss wants that it should have A-Z choices above, so viewers can easily found what they're looking for.

Thank you so much.
I'm looking forward that someone can help me here.

Carla

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
Each can be a different href <a> tag.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
kakai25

kakai25

    Newbie

  • Members
  • PipPip
  • 11 posts
How's that sir? Thanks again.

#4
kakai25

kakai25

    Newbie

  • Members
  • PipPip
  • 11 posts
Sir that was the code. How can I filter the searched companies through A-Z?
Thanks so much. :)

Deleted*

Edited by kakai25, 23 May 2011 - 11:29 PM.


#5
kakai25

kakai25

    Newbie

  • Members
  • PipPip
  • 11 posts
Please help me. Thanks!

#6
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,124 posts
  • Location:Vancouver, Eh! Cleverness: 200
It is sometimes hard to suggest code when there is already so much of it, and when your description is a bit vague.

Your directory list seems to be in alphabetical order, what do you mean filter A-Z when searched?

Also, is the code you have posted allowed to be public outside your job?
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#7
kakai25

kakai25

    Newbie

  • Members
  • PipPip
  • 11 posts

Alexander said:

It is sometimes hard to suggest code when there is already so much of it, and when your description is a bit vague.

Your directory list seems to be in alphabetical order, what do you mean filter A-Z when searched?

Also, is the code you have posted allowed to be public outside your job?

There are links above or below,
for example,

A B C D E - Z,

then if you click letter A, all the companies starting with letter A will be shown.

That's what my boss wants me to do.

Thanks sir.

#8
Calgon

Calgon

    Learning Programmer

  • Members
  • PipPipPip
  • 56 posts
I assume you're using SQL?

Your query would be something along the lines of:
SELECT * FROM `items` WHERE `itemname` = 'A%'

You would have to create a small page/script that would retain code like this:

if($_GET['filter'] == "A") {

$query = mysql_query("SELECT * FROM `items` WHERE `itemname` = 'A%'");

while($array = mysql_fetch_array($query)) { 

// your other code

}

}

if($_GET['filter'] == "B") {

$query = mysql_query("SELECT * FROM `items` WHERE `itemname` = 'B%'");

while($array = mysql_fetch_array($query)) { 

// your other code

}

}


and so on, then create some code that links to your script, the way to access the data would be:
script.php?filter=[alphabetical character]

I'm very sorry if I wasn't too clear.

#9
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
If every image is the content of an anchor tag, that makes every image a clickable item that directs to a new page. As long as that page is the site for the company, you have the effect you want. Aside from that, you could use the onclick event to have some javascript do the same thing.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#10
kakai25

kakai25

    Newbie

  • Members
  • PipPip
  • 11 posts

Calgon said:

I assume you're using SQL?

Your query would be something along the lines of:
SELECT * FROM `items` WHERE `itemname` = 'A%'

You would have to create a small page/script that would retain code like this:

if($_GET['filter'] == "A") {

$query = mysql_query("SELECT * FROM `items` WHERE `itemname` = 'A%'");

while($array = mysql_fetch_array($query)) { 

// your other code

}

}

if($_GET['filter'] == "B") {

$query = mysql_query("SELECT * FROM `items` WHERE `itemname` = 'B%'");

while($array = mysql_fetch_array($query)) { 

// your other code

}

}


and so on, then create some code that links to your script, the way to access the data would be:
script.php?filter=[alphabetical character]

I'm very sorry if I wasn't too clear.


Thanks Calgon. It would be a big help. :)

#11
kakai25

kakai25

    Newbie

  • Members
  • PipPip
  • 11 posts

WingedPanther said:

If every image is the content of an anchor tag, that makes every image a clickable item that directs to a new page. As long as that page is the site for the company, you have the effect you want. Aside from that, you could use the onclick event to have some javascript do the same thing.

Got it WingedPanther. :) Thanks!

#12
kakai25

kakai25

    Newbie

  • Members
  • PipPip
  • 11 posts
Thank you for all the replies. :) Codecall is really good.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users