Array Of Links.
I'm trying to make a addon(future) for one of my applications. Basically what I'm trying to do is to be able to add extra links to a navigation tab. At the end I want to only have one variable(array) with all the data in an array.
And then Send the data to the navigation function to add the extra links.
I Could simply run trough it with a foreach loop, When I thought about it I hit a Wall. ~| I just can't think of how to use a loop to get the data and echo it in links.
I'm thinking of doing something like the following,
$Links = array(
"Tab Name" => array(
"Link One" => "index.php",
"Link Two" => "apps.php")
),
"Tab Two" => array(
"Link Three" => "info.php")
);
Okay.., Simple enough to create an array.. Here is my question, How would I go about extracting the data out of the array, and display them? Should I just make another two variables, and again, and again..? I think If I did that the script would time out. Code:
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Passing Info Of Checked Boxes(array Value) Using Next/previous Links
I have a webpage which generates product information from a database, with a checkbox next to each product. There are 20 products per page, and about 220 products right now. I have next and previous buttons on top which are generated dynamically using $PHP_SELF according to the # of products in the Database. I can check off products that I want delete on one page and then click on a submit button, which deletes those products of the main page. Now my main question is this.....my array of checkboxes is named to[], can I check off products on 1 page, then click on next, etc etc. till I check all the products off i want to send delete to, but remember the values of all the previous checkboxes?? In other words when I click on submit for my last product, will it remember all the names that I checked off? PHP Code:
How To Count Links To External Links?
I get results of the query diplayed on my find.php page with links to different web sites. I want to store count of clicks on each of those links that are displayed on my find.php page. How can I do that?
Active Persistent Links And Active Links Both 0
I just installed Apache/MySQL/PHP I'm trying to test if the connection to MySQL is there I know the database works on its own, I checked that when I run phpinfo() I get mysql listed, I'm just wondering if when it says "Active Persistent Links" and "Active Links" both 0 (zero) under "enabled" column, is that fine, meaning configured properly?
Links
I want to use jpg.pictures from another website. Before I want to check if the file exist I tried (file_exist("http://www.xx.yy/path/file.jpg")) but that is not allowed Also tried linkinfo("http://www.xx.yy/path/file.jpg") but, however some files do not exist all the results are True (-1) Thate could be correct because the path exists, the file doesn't.
Links
Is there a way I can add a link from the front page of my forum out to my php photo gallery. I would like to make it so instead of clicking on the forum name on the first page which then takes you to a sub forum which then takes you to a thread with the link, To just click on the forum name which takes you to my photo gallery. Next best would be on the front page in the description of the new photo gallery be able to add a link. Which file would I edit to change or add these links? I know I can add a link in the overall_header.tpl but I do not see a way to change the forum name link that takes you from the first forum page to the next.
Links
so i want to be able to have certain things in my links like so: woods.php?area=1 not i dont want them to be able to change the 1, i have seen sites that when you hover over a link and the description and location of the link comes up in the bottom of the page it has all these ?step=1&blah=2 etc etc but when you click the link it doesnt have anything in the url bar except doc.php.
Sym Links
i have been creating sym links, for my little project and im now having problems accessing them? You don't have permission to access /test/phpdb/mp3 on this server. Apache/2.2.4 (Unix) DAV/2 mod_ssl/2.2.4 OpenSSL/0.9.8d PHP/5.2.1 mod_apreq2-20051231/2.5.7 mod_perl/2.0.2 Perl/v5.8.7 Server at clark.ee. Port 80 user nobody has permission to all directories in htdocs, the symlinks are stored ion /opt/lampp/htdocs/mp3
Dynamic Links???
I’ve looked at several tutorials and searched the archives of this site. I found a few pointers, but I feel entirely daft and can’t seem to quite get it. The “ultimate” goal is to display members profiles, and not have to hard code all the bl**dy records, as I’ve done so far. (Current version http://www.internetbonsaiclub.org/c...y/profiles.html) So, now I have the records in one table in my database. The profiles.php3 page takes all the records in that table, and displays the names in alphabetical order. So far, so good. Now, I have viewprofile.php3, which should display only one record at a time, based on which name the visitor clicked on.
Links From Txt File
I have this code: <? $links = file("mylinks.txt"); $antal = sizeof($links); for($vis=0; $vis<$antal; $vis++) { echo"<a href='" . $links[$vis] . "'>" . $links[$vis] . "</a><br>"; } ?> It works fine, but: When I view the source, there's a linebreak (as in the txt file) after each $links[$vis] And I don't like it! How can I prevent the linebreak?
Function Links
I have seen on some sites (evilwalrus.com for one) where they not only highlight the PHP code in the scripts they display but they also link any native PHP functions from within the code to there explanations like in the example below and I was wanting to if anyone knew how I might accomplish something like this. Code:
Previous And Next Links
How would I make automated Previous/Next buttons on my web-site (using php and mysql). I have read many different articles on the web, but none of those have helped me. What I need is the Previous/Next links show up depending on the number of rows, and the row that the user is currently on. Basically, the number of rows is undetermined, and it should only show one row per page.
PHPSESSID And Links
My host compiled the feature into the php build that auto appends the PHPSESSID to links when sessions are on. Now, a lot of my links have the PHPSESSID value inserted in the middle of the link, after the '?'. For example: http://www.utorials.com/browse.php?...2c6d5f72e7f81=0 should be http://www.utorials.com/browse.php?cid=9&sid=0 the =0 is after the id for some strange reason. The problem is very consitant in that it appears on the same links in the same way each time. Some links are fine. Any ideas?
UTF-8 Email With Links
I have an email in utf-8 encoding. In the content of the email, I need to send a link in which the filename is in utf-8 string...just like this.. $content = "<a href="http://xxxxxx/".$filename.""">Link to file</a>"; however, the link can not be correctly passsed and it automatically encodes it into %xx format. How to solve the problem? I've tried urlencode($filename) and urldecode($filename) but cannot fix the problem...
In Need Of Ebook Links
im new to this group and im desperating seeking ebooks on PHP-MYSQL, so any one plz suggest me the same one....
Links By Sql Command.
What I am trying to do is that I would like to know how to make links to take out my datas from my database. Let's say I will make 3 links. One is Name, Second is Country. Third is age. Whenever a user click one of them, it comes out my datas order by that(A-Z) like sql command---> order by name, ****ry, or age. I would like to make three links so that users can choose from these options.
Multiple Links
I have an idea but don't know if it's possible, from a technical point of view. Imagine to have some text. Example "John and Mary go to the cinema." I'd like to have this kind of links. By selecting "John" I can go to: Link 1 (eg. page 1) Link 2 (eg. page 2) Link ... By selecting "John and Mery" I can go to: Link 4 (eg. page 4) Link 5 (eg. page 5) Link ... So, the word John can be included in two links. The links are multidirected. Do you know if there is a package useful for this purpose? On the contrary, do you have some suggestion useful to achieve this goal? I really don't know how to start. It could be nice to have this possibility. Example "John and Mary go to the cinema." I could choose: "[John] and Mary go to the cinema." and then go to select among the possible "John" links. or: "[John and Mary] go to the cinema." and then go to select among the possible "John and Mary" links.
Dynamic Links
I would like to create dynamic return paths as links on site pages. For example, there might be a link to the whet stone page on both the chisel and plane pages. If my viewer came from the plane page, I'd like the return path to indicate "home->planes->whet-stones", appropriately linked. Likewise if from the chisel page, "home->chisels->whet-stones". Above the immediate back link, normal site layout logic would apply. Should the referer page be off site, site layout would rule. This doesn't appear to be particularly difficult.
PHP Text Links
I was wondering if there's a way of getting info back from a database using PHP without using forms, but text links instead? I think it's similar to the way the likes of yahoo make their search engines. The user types something and the engine brings back everything matching certain key words. These are links and when the user click them, it brings back the whole listing. If anyone knows how to do it, I'd very much like to find out.
Links In Php3
echo "<a href="link.htm" onMouseOver="window.status='Hie , I am Wallace ' return true ">Home</a><p>"; This script works fine in html page but when I put it in a php3 page an error message appears in the status bar .
Previous , Next Links
i tried to create a page with Previous Next features. but can get it working , the code look like this PHP Code:
Automatic Links
what is an easy way to parse a string that is being outputted along with html onto a browser in order to find all URLS and email addresses, and then automatically formatting them so that they are linked to either that url or email address? Basically, I would like to send a string like this: Hello, my email is estrabd@yahoo.com and my homepage is http://www.mysite.com To a function that would return something like this: Hello, my email is <a href="mailto:estrabd@yahoo.com">estrabd@yahoo.com</a> and my homepage is <a href="http://www.mysite.com">http://www.mysite.com</a>
Flash MX And PHP Links
I have a website with a link to a .php page with my images on it. I would like to create a link inside a button within flashMX to link to that php page. This is what i have inside the actions for the button: on (release) { getURL("http://www.connorslack.ca/gallery/albums.php", "_self"); stopAllSounds(); } But because there is a.php instead of a .com i dont think it is working.
Gather Links?
I wondered if its possible to get links from a webpage using html? Kind of like a bot that goes through the site, or would I have to use something like VB or C
Hiding Links
Im not sure how it can be done, but i just want lets say my shopping link (Button) to be seen only if your logged in. Im just not sure how how to go about doing this.
Dynamic Log In / Log Out Links
This is hopefully an easy one - just trying to have a link that's to log in if no-one is logged in, and log out if they are. From a bit of a search, I realise it should be : <?php if(isset($_SESSION['username'])) { echo "Logout"; } else { echo "Login";}?> Can anyone help me out with the syntax / code to define "Logout" and "Login"
Require And Links
I want to require (or include no problem) a remote file (page) and retain its original links when I try to so, the URLs changed and indicate to my server.
Next Previous Links
Problem is that when i look at selected image (selected id) links are not printing out according to mysql query. Sure there is a problem with $_GET, variables and i guess construction of the links, I mess it up, and looking forward to some solution. I feel really stuck on this one, and new and new ideas not helping much. Code:
Checking Links
Is it possible to check if a url (link) is still active ? I was thinking maybe you can check a link with a http response request and check what you get back ? so when you get a 404 page not found response you can mark that link to be deleted or something like that.
Variables In Links
I have a link that is already passing variables, my problem is trying to add onto the link. If i use the $_SERVER['PHP_SELF'] variable I only get up to the filename. If I use the # sign in the href tag I get the whole link, but I can't append a variable to it. Is this possible or do I need to create multiple links based on what variables are present?
Prev/Next Links
On my site I display 1 photo at a time, the url is like: ...photo.php?id=2 ...photo.php?id=3 ...photo.php?id=4 ..... I would like to have links on the photo.php page to the preious and next photo. So far I have something like: <a href="<?php print ($_SERVER['PHP_SELF'] . "?id=" . ) ; ?>"> next</a> How can I read the current id from the url so that I can use it in the link script?
Links From Search Results
Hi i was wondering if anybody could tell me how to make url links to an item in my site from a list of search results. Here is a piece of my code: <?php $Name = $HTTP_POST_VARS["query2"]; $Eventtype = $HTTP_POST_VARS["query2"]; $EventStart = $HTTP_POST_VARS["query2"]; $EventEnd = $HTTP_POST_VARS["query2"]; $VenueName = $HTTP_POST_VARS["query2"]; if($Name or $Eventtype or $EventStart or $EventEnd or $VenueName) { $conn=@mysql_connect("mysql", "u0rr") or die("Sorry can't connect to database"); $rs = @mysql_select_db("u0rr", $conn) or die("Sorry can't connect to database"); $sql="select * from event left join venue on (event.VenueID = venue.VenueID) where (Name like '%$Name%' or VenueName like '%$VenueName%') AND Eventtype = 'Comedy' "; $result=mysql_query($sql,$conn); while( $row = mysql_fetch_array($result) ) { echo("<b>"." Event Name: "."</b>".$row["Name"]."<br>"); echo("<b>"." Event Type: "."</b>".$row["Eventtype"]."<br>"); echo("<b>"." Venue Name: "."</b>".$row["VenueName"]."<br>"); echo("<b>"." Event Start: "."</b>".$row["EventStart"]."<br>"); echo("<b>"." Event End: "."</b>".$row["EventEnd"]."<br>"); echo("<b>"." Availability: "."</b>".$row["Availability"]."<br>"); echo("<b>"." Description: "."</b>".$row["Description"]."<br><hr>"); } } ?> For example if i enter an event type as 'comedy', a list of search results will come up from the form input displaying comedy events. Now from these results i would like to be able to click on Venue Name and this would link to that page in another part of my site. I hope this explanation is o.k, if not post a thread & i'll try and explain a bit better. Thanks for any help
Using SID In Links Conditionally For Sessions
I am creating an app with PHP sessions, and I want to account for those users that aren't returning cookies (yes, it does happen). I only want to embed the SID in links if - and only if - regular PHP session handling (using cookies) fails. I tried keying off the existance of SID, but apparantly SID exists regardless of whether the user is returning cookies. I've got a function called build_href_link that will conditionally embed the SID, but I need a somewhat foolproof method of determining if the regular session method fails. Anyone done something like this or know how to help?
Session Being Appended To Links?
Some of my links are being appending with PSPSESSID=3424lj234l... http://www.domain.com//ListDetail.p...cd66005c02eb5fc Any ideas as to why?
Finding Links In A Page
I want to parse a html file in order to retrieve all its links and put them in a table. Can someone please help me w/ the better way to do so ?
Automatic Links For Key Words
I have a site with a large number of pages, and want to use PHP to automatically cross-link them using key words. For example, whenever the word 'contact' appears, I want it to automatically link to the 'contact' page. Because there are 100+ different pages, I don't want to have to edit the links manually.
Links From Search Results
i was wondering if anybody can tell me how to make a url link to another part of my site from a completed search result. here is a section of my code i would like to link from. echo("<b>"." Name: "."</b>".$row["Name"]."<br>");
Next And Previous Links For A Journal
i am trying to add links to my journal (URL is an example page) to move back and forth between the entries. i only want to have next and previous, not next 1 2 3 4 5 6 previous. i got this code from a php/mysql book, and i *think* it's supposed to do what i want, but no matter what, i always end up with just a "next" link that links to URL. no previous link ever shows up. PHP Code:
Links From SELECT DISTINCT
I have a mysql dbase with PHP, in the dbase I have Items from various locations. What I want to do is to use the SELECT DISTINCT to make a list with all the locations. This isn't the problem, now I want to change the locations into links, so if you click on one of them, you will get a list with all the items from that location.
Links Not Connecting To Description.
I have a query that when called, brings up the found results which are hyperlinked. When clicked on, the link should connect to the description of the product searched for. Right now, the results just contains a link to http://ehagglers.com/v2/showdetails.php?productid=1 or http://ehagglers.com/v2/showdetails.php?productid=2 or whatever the query number clicked on in the results. I need someone to make it so that the links (when clicked) bring up the correct description for that specific product. Is this easy?
Creating Links Out Of Db Content
I have a db that looks like: field: apartment field: city field: link At this point I'd like to construct a script that will pull a keyword out of the url string, and grab the "apartment" and "link" fields that correspond (matched by category), and display them in link form on a page. I have the script down so it will grab the keyword it needs, and the select statement that will grab the two fields. My question is. Once I have the $result , how can I parse them to use the way I'd like....each city with it's corresponding link...displayed. while? For? List?
Finding All Links (like Trans-sid)
Im trying to replicate the action of enable-trans-sid with a script. e. g throw a function a html page/string and it will replace all links - relative or absolute - with a variable at the end. either link.html?var=$var or link.html?inpage_var=something&var=$var depending on whether the link had a querystring on it already. any ideas? anything already done? dont really want to reinvent the wheel. Im guessing preg_replace_callback is going to be used.. something like $html = preg_replace_callback('/<(a|area|img|link|frame|iframe|input)(.*?)(src|href )(s?=s?)("|')?([^> '"]+)/is','rewrite_url', $html); function rewrite_url($html) { }
Replace All Links With Url Index?
I'm writing a newsletter poster for a website. I have some html news items which I want to turn into plain text and prettify before emailing it. Now, i have found wordwrap and strip_tags so the only problem remaining is the links. Below you see what I like to see, but I haven't got a clue how to get there. $html = '<p>My <a href="http://go.there/stuff">link somewhere</a>.</p>' doSomeMagic($html); echo $html; After doSomeMagic I'd like the echo to look like this: My link somewhere[1]. [1] http://go.there/stuff That is, in the text I want an reference, and below the entire paragraph i want a link index.
Why Is Localhost Added To All My Links ?
Not sure if this is a php, mysql, or apache issue. I use win2k and I have AMP on my system as a localhost. I use this to test PHP/MYSQL scripts I write on my local PC. I render a URL w/PHP by reading the URL string from a mysql field, eg. on the php web page it shows as eg. www.yahoo.com link But when I click the link I see that "localhost" is added to the URL and it goes nowhere. ie. it get localhost added to the front - localhost/www.yahoo.com Is there a setting somewhere so that the link is exactly what the link is and localhost is not added.
Prev/Next Links - For *Oracle*
I haven't found a workable solution for developing those Prev/Next links for Oracle. There's heaps of solutions for mySQL using the LIMIT clause and I realise Oracle uses ROWNUM, but with rownum, it seems that one can only just pick out row X to row Y in a query. The generic statement being: SELECT FIELD1, FIELD2 FROM TABLE WHERE ROWNUM BETWEEN 1 AND 20 What good is it if I can only display the first 20 rows if I have say 300 rows and want to display 15 pages of 20 rows each? Perhaps some other method could/should be used? ... but then, I'm not experienced enough to know how else to do it. ..... Anyway, I still have a small glimmer of hope that in this day and age, it can be done. I'm sure it can. Someone out there must have an answer .... where are you??? If you have the answer, there will be hundreds of people who will be indebted to you. Believe me. Or if you know of a script stashed somewhere on some forgotten server - a point in the right direction would be appreciated.
Text Input With Links, Etc..
I hope you can give me a few pointers on this issue. I'd like visitors to my website to be able to enter text to be viewed on the site - a bit like a bulletin board or forum. I can do this for regular text easily by simply populating a 'TEXT' field within my MySQL database and grabbing it back when rendering the site using PHP. However, I'd also like visitors to be able to put in URL links or email items that can be clicked. How would I go about doing this?.I've seen this sort of thing on forums where words can be selected and a URL applied, but I have no idea how to do this and how this information (ie. the link and the associated text) would be stored in the database field(s). Any ideas?. Are there any PHP examples available for this sort of thing?.
Creating Links Out Of Terms On The Fly
I want to run a website with definitions. when text else where on the website is displayed, i want to automatically find all words that we have definitions for and then display a javascript mouse over (which is organised by a div tag which i already have the code for) I have no idea where to start and would appreciate a starting point. what would you call this procedure? I couldn't find anything on google that could help. i've struck a blank.
Prev/next Links With Readdir
I've a HUGE image gallery that is all pulled off of one page, and a seperate include that automatically generates the thumbnails. all that works fine, but I pull the main images with a readdir() command, and I don't know how to use prev/next links with this... I can do it with an SQL query, but I can't find anything on using this with filesystem functions. Code:
|