Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




Hyperlink


Im making a select statement and the outputs are in a table but i want the entry of a column to be hyperlink to take to another page Code:




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Displaying A Hyperlink
I pull a string out of MySQL and display it in an html page using PHP. It automatically becomes a hyperlink but if it is a link to a document (www.web.com/test.doc) it won't translate it into a hyperlink. Does anybody know how I might do this?

Hyperlink Query
I have the following line that prints out a record with a link, when you
click the link you get more column
information in the record. I want to add another field (State) so that I can
narrow down the results. How can I pass both the hcounty as I'm doing now,
along with state? to the state7.php file?

print " <td><bgcolor=#000000><font color=#000000 font color=#000000
face=Tahoma size=2 ><A href='state7.php?searchid=$line[hcounty]'><img
src='buttondetail.gif' border=&#390;'></img></td>
";

Replacing Www... With Hyperlink
i want to replace all entries of beginning with 'www.' and
ending with ' ' with a hyperlink to that substring such as:

www.google.com := <a href="www.google.com">www.google.com</>

can anyone tell me the easiest way to do this?

HyperLink Validatation
I am wondering what approach I could used to validate links. I am building a simple portal type index and I would like to be able to check for broken links weekly. The Database already has a field for link status. I would like to create a script that checks for broken links and changes the status so a human can follow up on it.

I am also wondering about how one would “limit” this program. I mean I don’t care if it takes 2 hours just as long as it does run rampant and cause issues with my host. Any thoughts…? I am not looking for a complete solution just a point in the right direction.

Hyperlink Per Mail
can anybody tell me how to sen a hyperlink using the php mail function.
If I send a <a ref ...> it just turns up in plain text. Whats the trick

URL Text To Hyperlink
here is what i have

   $threadx = preg_replace("/((ht|f)tp://[^s&]+)/", "<a href="$1">$1[/url]", $threadx);
   $threadx = preg_replace("/(S+@S+.w+)/", "<a href="mailto:$1">$1[/url]", $threadx);

can someone tell me how to make it better,
this one completly screws up existing hyperlinks and <img src=""> tags...
need to fix it somehow..

Hyperlink With Parameters
Is this how you print a hyperlink passing parameter action , id, qty to another php script? And printing HTML inside php? I giving three sample code in my program.


I use quotation around HTML TAG and code so can read by php print command.

1. Hyperlink with parameter to pass

print "<a href = "cart.php?action=Add&id=" . $column['SKU'] . "&qty=1">Add Item</a></font></td></tr>";

2. Printing HTML tag with PHP print command

print "<TR><TH>Title</TH><Price</TH><TH>Description</TH><TH>Add Item</TD></TR>";

3. Here I try to print a drop down list with Javascript onChange event. Notice that I use concatenation between HTML TAG and PHP code. I use to respesent quoatation mark.

// print the drop down that will update the qty instantly using Javascript onChange event
// the following syntax will look like this in regular HTML code
// <select name = "$column['SKU']" onChange = "upDateQty(this)"><option
Selected>i</option></select>

print "<tr width = 15% height = 25><td width = 15% height = 25><font face = verdana size = 1 color = black>";
print "<select name = "" . $column['SKU'] . ""onChange = "updateQty(this)"";

for ($i = 0; $i <= 20; $i++)
{
print "<option";
if ($rows['QTY'] == $i)
{
print "SELECTED";
}
print ">" . $i . "</option>";
}
print "</select></font></td>";

Using A Hyperlink To Retrieve Data? Is It Possible Without?
I was wondering if it is possible to get data from a database using a hyperlink instead of a form? My situation is I have a page with a list of products (data from a mysql table) and I want to keep the info on the page small so I have limited the description and left out some info. what I want is a link at the bottom of each product that says "more details" and when clicked it creates a new page on the fly to show more info. is it possible to do this without javascript? If so How.

Hyperlink And Passing Of Variables.
I know three ways to pass variables form one page to another. The first
one is to declare and set session variable. In this case if one goes to
another page (by clicking on hyperlink or pressing a button) value of a
session variable will be automatically seen on the new page. The second
way is to set hidden variables in the form and go to new page by
execution of this form (press a button or enter), and the last way,
which I know, is in the declaration of hyperlink after name of a new
page put after "?" names and values of variables. Sometimes I need
to use the third way. However I do not like that after new page is
loaded in the address line of browser one can see all variables (names
and values). Can one avoid this problem?

Hyperlink And Posting To New Page!
I have a page where I have done a successful query and get search results displayed. Now I would like a link activated so that they can click on the name and go to new page with further details about that company like address hours etc.

Hyperlink - JS Function & PHP Variable
if its possible to call a JavaScript function and pass on a PHP variable in 1 hyperlink?
I need to pass on variable: $lang=english And call JavaScript Function: javascript:loadScript1()

Executing Code Within A Hyperlink
I am writing a photo gallery and suppose 8 photos are displayed. When the
user clicks on a button under the picture, I want it to add that picture
name to a "favorites" list within the session data, but NOT leave the page
the user is on. How could I do this?

Need A Script To Tell Me Where A Hyperlink Originated
Not sure if this is a php or an html question but I'll post it anyway.

I have multiple thumbnail images on my catalogue page catalogue.php and they are
all hyperlinked to a single page called desc.php that will give an enhanced
description of the product selected.

I want the desc.php page to print the contents of a text file named ?.txt based
on which image was clicked on in my catalogue page.

example: if I click on 1.jpg in my catalogue then I want the file 1.txt to be
selected and printed on my description page.

I know how to print the contents of a textfile and I know how to disect the
strings of the filenames so that I can associate 1.txt with 1.jpg.

What I dont know is how to retrieve the name of the image file that was clicked
on the catalogue page within my script for the desc.php page

If I didn't use a hyperlink image and used a form submit button instead on my
catalogue page then of course I could use something like:

$filename = $_POST['filename']

Hope you understood all of that.

Table Output As Hyperlink ?
i am trying to create a table generated from a MySQL query with some of the output as hyperlinks. in this way i intend that the users of the site click to see the customers registered and then click on the "hyperlink" of their customer id, which will navigate them to details about that user on another php page. PHP Code:

Passing Variables With Hyperlink
I've managed to get a MySQL database up and running and can display the data with PHP to a web page. What I'd really like to do is click on a field on the web page to display another page based on that value.

As an example using a membership database, I display an index of member no and member name to a web page. I'd like the member no to be a link that when clicked on would allow me to display the entire member record. I just need to know how to pass the variable from the hyperlink to a php script to do the query.

Hyperlink To An Excel File
I have a hyperlink to an Excel spreadsheet but I'm having a bit of trouble with it. My first problem was that IE6 integrates Excel into the IE window when you click an Excel link. I overcame that by having a dummy Excel file run that had VBA code to launch the real application in a new window. That's probably too much info, but there it is.

Moving on. My problem is the users will be opening up this VBA Excel application of mine from our Intranet. When they click on the link, the dummy Excel file runs, that in turn launches the real application and all is well and good. Except for one thing. When the user is done or goes back to the IE Intranet window where they launched the application, this is the error that is displayed:

The page cannot be displayed: The page you are looking for is currently unavailable. The Web site might be experiencing technical difficulties, or you may need to adjust your browser settings.

My two solutions were to either have the link do two things simulatenously. You would click on the app link and it would run the application and it would also reload the Intranet home page. My second solution was to have them click the link and then it would go back to the previous page they were on all in the same click procedure/event/whatever. Code:

Basic Hyperlink Query
I have a php series of scripts/programs/files which provide a simple
calendar/scheduler program.
When either an email or web address/hyperlink are displayed within the
output, they seem to have the browser default link colours and underline.
Altho the output table/content is within a div in the web page, I seem to be
unable to apply CSS styles to the div contents in this case.
I have even tried !important to no avail.
There does not seem to be any HTML tags in the PHP controlling them.
Is it possible for anyone to help me to apply CSS styles to these links
without you being able see the PHP etc?
Ignore this if I am asking for the impossible/impractical.

How To Download File From Hyperlink?
How to download file from hyperlink? I successfully created a pdf file and stored the file name,location inside a table. Now i am showing the link on the page and when user click this link i wish to open this pdf file from the server on the user desktop in a popup window.  $filelocation == http://locatiion/pdf/xyz.pdf 

i.e,  echo "<a href='<?php $filelocation ?>'Click to open</a>"; 

Its bit scary when i read another thread about downloading big files, although my files are very tiny i mean 30kb in size.

Extractng Text From Hyperlink
I need to extract the text within anchor tags for use in building another hyperlink.  In other words, if I have something like this:

<a href="http://www.something.php?id=12">Blah blah blah</a>

I need to get the 'Blah blah blah' part.  I'm thinking that a regular expression is the way to go, but I'm having difficulty seeing how to deal with the stuff in the href attribute.

Going Back 1 DirecTory In Php Hyperlink?
how i can go back a directory from the current code: say for example in the code below im in localhost but current location in that directory is in a sub directory but i want to refer to a file back in the localhost? how do i do that?

echo"<ul><li class='style9'><a href='$cat_name'.php'>'$cat_name'</a></li>
      </ul>";

Hyperlink In Text Area
I have a basic CMS system and the client would like to insert some links in the text area. What would you recommend the best way to do this in a textarea box? There may be several hyperlinks in 1 textarea and some may have none at all.

I assume this would be some sort of javascript code or is there an easier way.

Retrieving Hyperlink Parameter Values In PHP
I have a PHP program that creates a page with several links all to the
same URL but with different parameter values in the hyperlink e.g. <a
href="FILENAME.php?VARIABLE=123">Click Here</a>. How do I retrieve
the value of VARIABLE (=123) in file FILENAME.php?

Conditional Email Text To Hyperlink
I am trying to write a content management section for a web site.

I have managed so far to use htmlarea to give users a basic, but user
friendly interface by which to edit the page content.

The user can add emails by symply typing john@example.com - IE automatically
converts this to a hyperlink. The trouble is sometimes the users use plain
text. I have been using the following line to convert plain text to a
hyperlink:

$pagetext=ereg_replace('[A-Za-z0-9_]([-._]?[A-Za-z0-9])*@[A-Za-z0-9]([-.]?[A-Za-z0-9])*.[A-Za-z]+',
'<a href="mailto:?subject=Email%20from%20web%20site"></a> ',
$pagetext);

This works well - BUT it completely screws up any existing hyperlinks. Is
there a way to convert the plain text email address in to a hyperlink only
if it is NOT part of a hyperlink.

Basically I need some way of checking
* If it's plain text > convert to a hyperlink
* If it's already an email hyperlink leave it alone.

I have tried looking up and testing everything I can think of - but am
finally asking around before I go mad.

Click A Hyperlink To Query MYSQL W/PHP - How?
Like so many questions this involves MYSQL and the PHP (or Perl) layer.

I'm going to have html in text fields and there's going to be what
normally would be an internal link to another place in the same
document. But in this case,
Code:

<a href="#futherdown">next title</a>

is not in the html document. When a user clicks this link I want to
query the DB and append/render the queried record on the I guess
existing (refreshed) page. What's a strategy to make a hyperlink query
via PHP?

Calling Php Function On Click Of A Hyperlink
How to call a php function on click of a hyperlink?

Changing An Image For Text/hyperlink
I have the following piece of code, which uses an image as a button. I want to remove the image and just have some text/hyperlink which has the same effect when clicked? Would someone please help and advise what needs to be changed...

<?php echo tep_image_submit('button_wishlist.gif', 'Add to Wishlist', 'name="wishlist" value="wishlist"');?> ....

Internet Explorer Hyperlink Bookmarks
Internet Explorer 6- is crap! Why does it reload an entire .php page when an internal page hyperlink is clicked? It's s'pposed to only navigate within the page not the internet!

Is there any way to force IE to stay within the page and NOT reload the entire page and THEN navigate to the rigth internal link?

Find URL And Replace With HTML Hyperlink
I have a database full of user input, some users enter in URLs.. when I display this information, I would like to go through the text, look for URLs and turn those into real hyperlinks... so I need to take http://www.whatever.com and make it a real hyperlink.

Am I in the right place? If so, how would I go about doing this?

I am using php/mysql and I would like to simply wrap a function around, for instance, my $output variable which holds the data retrieved from a user input.

Setting Session Variable In A Hyperlink?
My new site has 2 columns. The larger left side contains the blog. This transfers page's using $_GET and URL's.

My right column will contain profiles, registering, login-ins etc. I want this to use sessions to work out what page to display. This way things can come and go on the right column without disrupting the blog side of things.

The problem I am having is actually setting the session variable which this will run off. For example if I want to view someone's profile, it would typically be done in a link i.e. blog?viewprofile=John. This would disrupt the blog as you would go back to the index page.

I have thought about using hidden form fields but this seem's like a lot of hard work for what i would like to achieve. Before I go off making my site a complex form is there any other way to set sessions without using the URL to trigger events?

Hyperlink In Table For Editing Information
What I have is a table with 3 columns, and in the first column, I have it linked to editpost.php? with the id behind it.  I need to somehow get that id into the editpost page to bring up the info in 3 text boxes for the user to edit. Not sure as to how to do this. Code:

Displaying A Table Using ID Number As Hyperlink
i am able to insert and display data to the end user, but i am trying to let the end user edit a row. I am unsure how this is usually done, but i am have the following code to display by data

 echo "<table border='1'><thead><tr>";
            for($i = 0;$i < mysql_num_fields($sql_result);$i++)
            {
             echo "<th>".mysql_field_name($sql_result,$i).
                  "</th>";
            }
     echo "</tr></thead>
           <tbody>";
     for ($i=0;$i < mysql_num_rows($sql_result);$i++)
     {
        echo "<tr>";
        $row = mysql_fetch_row($sql_result);
        foreach($row as $value)
        {
           echo "<td>".$value."</td>";
        }
        echo "</tr>";
     }
     echo "</tbody></table>";

The user have a jump menu (combo box) to pick the table they need to show information on, so the columns displayed are going to vary, but i have a column called ID which is the same in each tables which is the index (auto increment) field.

I was thinking about using this number comnbined with a hyperlink, so the user can click it to take them to a page to edit that row.... But i have no idea how to do this, or if there is an easier way which i just do not know; or how do most people achieve what i require...

Creating An Hyperlink From A Sql Query Image
I have an sql query that pulls an image filename out and displays that image.

echo "<img src='/images/thumbnails/{row["Filename"]}' width='75' height='50'>";

I have another images folder with the larger pictures, they also have the same filename. What I'm trying to do with no success! is for the thumbnail image displayed from the query be an hyperlink to a blank page and display the larger image.

How To Do Hyperlink Using Date In Daily Report?
I'm currently doing on a sales system assignment which can generate daily report order by branch and date.

There is a report menu which users can choose the branch and date that they would like to view. my currently report form is to show all the chosen date report in one page.so if the user choose from 1st of the month to 31st of the month, then the page will become so long.

So, is there any means to generate the daily report that just show one-day daily record with the hyperlinks of other selected date below the report.if the user wish to see other day's daily report,then he can click on the hyperlink itself. Code:

How Convert Http:// Text To Real Hyperlink?
I have some texts in MySQL databases. When I show this texts in webpages using PHP, I need to convert every ocurrence of

http://blablabla.com

to

<a href='http://blablabla.com'>http://blablabla.com</a>

, so my text will really became 'active'. The people who wrote the texts don't know HTML tags so I can't ask them to write explicity <a...> </a> commands. The problem is the same with text that contains the @ charactere, as

name@mailserver.com

. I have to change this to

<a href='mailto:name@mailserver.com'>name@mailserver.com</a>.

Please, I don't know how to use regular expression. I think It can make this replacemments very easy..

How To Open Random Flash Page Using Hyperlink?
I'm new to using PHP so please bear with me.

I'm trying to create a hyperlink that will open a random Flash page so that users will see a different flash module each time. Here is some of the code that I wrote but I'm not sure if it'll work since I'm not very good at coding. Oh yeah, I'm not using a database either.

// random_menu.html
<head>
<?php
$i = rand(0,3);
?>
</head>
<body>
<a href = "www.x.com/random.php?i=$i">x</a>
</body>
---------------------------
// random.php
<head>
<?php
$i = $_post["i"];
if ($i = = 0){
$value = "a";
}
else if ($i = = 1){
$value = "b";
}
...etc.
</head>
<body>
<object>
<param name="movie" value="$value">
<embed src="$value"></embed>
</object>
</body>

Please help if you know how to do this.

Setting A Session Variable Via A Hyperlink, Then Redirect
I usually have my nose in photoshop or flash, so PHP is still very new to me.  The project I've been given is to have a spanish version of our cardholder site.  The way I've achieved it so far is..

Create a php file that has all of the english/spanish translations in arrays.  An example would be Code:

Hyperlink From Intranet Web Page To Local Files On My Computer
I'm creating a company intranet, and every employee has certain
program we want them to be able to run from it, meaning we want the
link to the program to be on the intranet page. For example, Adobe
Photoshop resides on all the employees computer under "C:Program
FilesAdobePhotoshop 7.0Photoshop.exe"

However, when I enter that as a hyperlink on the page, it does not run
the program.

Is there a way to get a web page to run a program on the local host?

Retrieve Data From Mysql Table And Put A Hyperlink For Download
I have created a database and a table and have stored the information in mysql table.
Now my question is how do I retrieve that data from the my sql table and have a php page that when someone goes to say:download.php, he/she will be able to download the data from my mysql table? Also what if I have multiple tables in mysql that I want to be able to download from the php file?

HTML Web Page Hyperlink To Php Web Page
I am still having a problem parsing a html page with php. Code in my HTML
is
<? php
echo '<a href="index.php">Home</a><br />
<a href="login.php">Login</a><br />
'
?>
However the link is to the Login page is:
file:///C:/Program%20Files/Apache%20Group/Apache2/htdocs/TeeJayUu/login.php

I am using PHP 5.0.2, Apache 2.0.52, MySQL 4.0.21, and Windows XP SP2. All
pages are in the htdocs folder and the following instructions have been
followed:
- Copy php5apache2.dll to Apache's module dir and rename it to mod_php5.so;
- Copy php5ts.dll to Apache's bin dir.
Finally, add the following line to your httpd.conf file:
LoadModule php5_module modules/mod_php5.so
Apache has been stopped and restarted.
Help - I am lost for what else to do. I want to keep this local until I
have got it working.

Using "Order By" By A Hyperlink
So this time i want to create a page that loads up some database fields into a table.
That works great. Next, I want to create a hyper link on the table header (one or two fields) that will allow the user to order the table by their results: Code:


Copyright © 2005-08 www.BigResource.com, All rights reserved