Jump to content

How to make(look inside)???


scepanmali

Recommended Posts

How to make link to lead to another page and in that page to be some info related to the "id" field in Mysql base? And also, to have that name in the name of the page!

Like, I have 10 lines in Mysql base and I want to click on 5th row. I want that link to lead me to the separate  download page, for example, with that item and just that row! And I want the page to have the name of that download item! Please, help me if you know! I know it's simple but, I really don't know! THANK YOU in advance!

Link to comment
Share on other sites

.....

 

i don't really understand what you're asking?

 

is that you want a page of links.

 

then when you click on one of the links it sends you to another page with the page header as the link name..?

 

do you need to use PHP and a database for this...?

 

what do you mean "some info" ?

Link to comment
Share on other sites

OK, I'll give you an example:

 

I have a page with 10 rows. And they all have download links in every row of the Mysql base.

Now, when someone clicks on "download link" from one of the rows, I want it to open another page with data which contain that clicked row. So, the first page contain, for example, "Metallica- Am I Evil" in one row and downlad link. When someone click on link, then he will be taken to another page which contain the sentence:

Download "Metallica- Am I Evil"! I don't know how to write the code for that! I know the rest and I know that this is one php line kode but...

Link to comment
Share on other sites

No, no :D

 

That is just an example!!! Well, more pages, more popularity, search engine friendly.

I already use that but I am not satisfied with the results!

 

The code will be something like this: <a href='http://www.example.com/new_page.php?red=5'>5.red</a>

I found this 20 minutes ago! But I don't understand this part: red=5'>5.red</a>

Can you explain to me, if this is good. I will be very thankful!

Link to comment
Share on other sites

Those are variables being passed to the next page. Anytime you see a '.php?', anything after that '?' is going to be a variable name, and then it's value. In this case, it is saying that the variable "red" is equal to "5".

 

What you do with this is, on the next page, you have a piece of code that does a $_GET['red']. This will read the variable red and then let you do comparisons or whatever you need to do.

 

I think in your case what you want to do is the following:

 

Have a page that reads all entries in a table and display them into an HTML table. In each table, you'll have a link that gets the "ID" fields, or some other unique identifier, to put in as a url variable.

 

Then, on your "download" page, you'll get that ID from the url, do another database query to get all the info about that item (including the title) and place all that info on the page, along with a link to download whatever the item is.

Link to comment
Share on other sites

For Alexhoward,

 

You are not right. I have only 7 or 8 pages but Google has indexed 75 pages!

They are all generated dynamically! Please, see my website and try to write the stupid code!

I just don't know how to make it work! PLEASE! This is not an advertisement.

 

http://www.music-videooos.com

 

I just need to make a link to the page which says: Download "and then the name of the video"

Please, help me! I drag myself all day :-[

Link to comment
Share on other sites

OK,

 

calm down...

 

why don't you show us how far you've got with the "stupid" code...?

 

And, i had a look at your site... sure that's legal?

 

I know you're a 3rd party, but watch out...

 

The download link i clicked on takes you to the rapidshare website, and says you have chosen to download "whatever", download.

 

so users aren't downloading directly from you?

 

so what do you want this page to do, say the same as the last page, then redirect then to rapidshare...?

 

know what you want to do, and know how annoying it is when people don't get the point, but guess i don't get the point ;)

 

Link to comment
Share on other sites

$sql = mysql_query("SELECT * FROM oblast_metal WHERE ID = '$id'");

 

while ($row = mysql_fetch_array($sql)) { ?>

 

<?php

 

$zajedno=$row['Artist']."- ".$row['Song'];

$id = $_GET['id'];

 

echo "<font size=3><font color=white>Download </font></font>";

 

echo "<font size=4><font color=grey>"." ". $zajedno;- How to make this code to link with $row['Link']! Something like: echo "<a href="$row['Link']>$zajedno</a>;

Please, help me if anyone knows! Thank You in advance!

 

}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.