Jump to content

Search the Community

Showing results for tags 'hyperlink'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Donation Link

Found 9 results

  1. I have researched the subject and found a few 'solutions' for my problem but cannot get it to work (I looked at ones in this forum). I have php while loop that uses variables for db values and wrapped inside <a></a> tags that work as desired. What I want to have the link open in a new tab. Here is the code I am working with: <?php //loop to collect and output db data as hyperlink with target="_blank" while($row = mysqli_fetch_assoc($result)) { //output data from each row echo "<a href='".$row[link]."'>&diams;&nbsp;&nbsp; ".$row[title]."</a><br>"; } ?>
  2. Could someone please give me advice or redirect me to helpful information on how to safely insert hyperlinks into a MySQL table by members/users of my site. I am particularly concerned about security. Many thanks.
  3. Hi all, I've got a problem with a php code on my website. I don't know why, but the hyperlink is wrong, because it's taken also the link of the current page, before the one of the page of destination. (see the attachment) Where is the mistake? Thanks all for the help $post_id = $instance['posts_name']; $title = apply_filters('widget_title', $instance['title']); if ( empty($title) ) $title = false; echo '<div class="widget top-story">'; if ( $title ) echo $before_title . $title . $after_title . "\n"; ?> <div> <?php $post = get_post( $post_id ); ?> <a href="<?php echo $post->post_name; ?>" class="image"><?php echo get_the_post_thumbnail( $post_id, 'top-story'); ?><span class="comment-icon"><?php echo $post->comment_count; ?></span></a> <span><?php the_time('d.m.Y | g:i A'); ?></span> <span class="rating"><a href="#" class="active"></a><a href="#" class="active"></a><a href="#"></a><a href="#"></a><a href="#"></a></span> <p><a href="<?php echo $post->post_name; ?>"><?php echo $post->post_title; ?></a></p> </div> <?php echo '</div>'; } /* Update widget settings */ function update( $new_instance, $old_instance ) { $instance = $old_instance; $instance['title'] = strip_tags( $new_instance['title'] ); $instance['posts_name'] = $new_instance['posts_name']; return $instance; } /* Widget form */ function form( $instance ) { $defaults = array( 'title' => '', 'posts_name' => '', ); $instance = wp_parse_args( (array) $instance, $defaults ); ?> <p> <label for="<?php echo $this->get_field_id( 'title' ); ?>">Title:</label> <input type="text" class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo $instance['title']; ?>" /> </p> <p> <label for="<?php echo $this->get_field_id('posts_name'); ?>">Choose Post:</label> <select name="<?php echo $this->get_field_name('posts_name'); ?>" id="<?php echo $this->get_field_id('posts_name'); ?>" class="widefat"> <?php $posts_array = get_posts( array('numberposts' => -1) ); ?> <?php foreach( $posts_array as $post ) : setup_postdata($post); ?> <option value="<?php echo $post->ID; ?>"<?php selected( $instance['posts_name'], $post->ID ); ?>><?php echo $post->post_title; ?></option> <?php endforeach; ?> </select> </p> <?php } }
  4. Currently on my site it is built to show 9 products at one time on the page. I want to build a view all link that would like to all the products in that particular category. My link is: echo("<a class=\"active\" href=\"$url" . "\">" . "View All</a>"); I can not figure out how to reconfigure the current code to make this happen. Have tried all different avenues have come close but can not get it. Baffled - it seems easy but can not reach the solution. Have attached my current function in my function.php file and my current code that is on the page right now. hyperlink.txt
  5. Here is an image of my comment format: http://oi40.tinypic.com/8w07jt.jpg The hyperlink to each individual comment is the date and time with the url in the format of, for example: /nottingham/#comment-184 After going through my comment templates I found that these two functions do the following, get_comments_link : Retrieves the link to the current post comments AND comments_link: Displays the link to the current post comments The problem is I have no idea where to include these functions so it creates a hyperlink to every comment within every comment. Once this link has been created I'd also like to assign a div to it so I can format it to be in the bottom right corner of each comment. My final goal is to manipulate the link so rather than the comment link itself it will automatically work in the facebook.com/sharer.php which I feel I can do myself once I figure out the previous part. Essentially it will be a share on facebook button, but I have found no plugins which do this yet and thought describing it as a hyperlink would be an easier way to explain what I'm trying to do. Elsewhere I've been told the following: but not sure how to implement this... I hope I've made the question clear, please ask if I haven't. Thanks in advance!
  6. Hi, Hoping someone can help me with a simple code change for my Joomla site. I have a line of php code set up to display a registered member's first name and last name on the profile page of my website. This is the code: <?php echo ucwords($agentdata[0]->cb_agentfirstname1.' '.$agentdata[0]->cb_lastnameagent1);?> It delivers the following result: Jan Brady So, my question is, how do I modify the code so that Jan Brady becomes a clickable link? The link should point to file name "agent1.php" Million thanks for anyone's help!!
  7. Hello: I am having a problem with making hyperlinks to link to the right location. What I want it to do is just add the filename to the end of the first part (C:\php\website\files\insertfilenamehere.jpg). instead, I get something like this: file:///C:/php/website%0Ciles/%7Bwin2010filebutton.png%7D. Why are % signs and more slashes showing up in my file path? Could anyone point me in the right direction as to why they are not showing up correctly? I would appreciate any help that can be given. while($row = mysql_fetch_array( $result )) { // Print out the contents of each row into a table echo $row['file']; $inf= $row['file']; echo "<tr><td>"; echo $row['tfid']; echo "</td><td>"; echo $row['lname']; echo "</td><td>"; echo $row['fname']; echo "</td><td>"; echo "<a href=\"C:\php\website\files\{$inf}\">Link</a>"; echo "</td></tr>"; } echo "</table>"; .
  8. Hiya I was wondering how the correct way to have a hyperlink of some text that is also anchored from somewhere else.. e.g. <h1><a id="SomeText Anchored"><a href="SomeText.html" class="TitleText">Some Text</a></a></h1> The above works but im not sure if its good practice? Thanks
  9. Trying to pass my results from MYSQL statement as links to card.php. How do I echo out the results as clickable links to card.php passing a get variable so that I can use this variable in card.php. The links should be playerName. <?php include_once 'header.php'; $con = mysql_connect("localhost","*****","******"); mysql_select_db("cards",$con); if (!$con) { die('Could not connect: ' . mysql_error()); } $sql = "SELECT * FROM cards ORDER BY RAND() LIMIT 4"; $results = mysql_query($sql); $array = mysql_fetch_array($results); $num=mysql_num_rows($results); $i=0; while ($i < $num) { $array = mysql_fetch_array($results); echo '<a href="card.php?cardid=' . $array->id . '">' . $array->name . '</a>'; echo "</br>"; $i++; } include_once 'footer.php'; ?>
  • 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.