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




Auto Linking


i'm tryin go to do a auto link thing and i'm running into some problems with my mysql statements

$sql_query = "SELECT * FROM tags";
$result = mysql_query($sql_query) or die(mysql_error());
$result = mysql_fetch_assoc($result);

foreach($result as $res){
$res["tag"] = $tag;
$res["link"] = $link;
}
echo "Test".$tag;

$keyword_array = array(
$tag => $link,
);




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Auto Linking To Html
Iam building a login form page in PHP that runs a PHP script. The form contains a $variable that passes to the script. Then I would like to direct automatically to the link below: http://www.$variable.com/login.htm What would the PHP command be to action the above link?

Linking A
I am using this code

echo "<tr><td></td><td id=tablesdirhead>Property Information</td><td
id=tablesdirhead width=ï`'>Agent Name</td><td id=tablesdirhead
width=ï‡'>Contact Info</td></tr>
";
while ($myrow = mysql_fetch_row($result))
{
$row = 1-$row;
$color = ($row==0)?"#F5F5F5":"#F0F8FF";
printf("<tr bgcolor=$color><td>%s</td><td>%s</td><td>%s</td><td>%s</
td></tr>
",
$myrow[5], $myrow[3], $myrow[0], $myrow[1]);
}
echo "</table>
";
?>

But would like to give the fourth "$myrow[1]" a PHP link like

<a class="dir" href="processformImage.php?action=&ID=<?php echo
$row["StoreID"]; ?>">$myrow[1]</a>

E-commerce And PHP Linking
I've done a little research and decided (for now) to use Verisign for the credit card processing, and link that to a Wells Fargo merchant account, which, as far as I know, should work just fine... so here are my quesitons.

is Verisign a good payment gateway?
do they support PHP? If so, how, if not, who does support PHP?
Is there anything else I need in between verisign and the bank?
Am I completely lost and going the entire wrong way?

IFrame Linking
I've just realised that this is probably a php question, so i might as will link it here:
http://forums.devshed.com/showthrea...7090#post177090

Linking Outside An IFrame
I have an iframe with a page and a link above it to the actual page. For eg :-

<div><a href="http://google.com">click here for original</a></div>
<iframe src="http://google.com" />

Now, as everyone knows, clicking a link inside this iframe will open the link in that frame too (unless specified). When a click is made i want to "click here for original" link to be changed too. To link to page that is showing inside the frame.

Linking Above The Webroot
i've been trawling the net for a few hours trying to get information on this but so far im not really finding any answers. I'm trying to link to files above the webroot (redhat & php 4.4.4) in order to not make the accessible by simply typing http://www.domain.com/file.mp3

everywhere i reading is that i would need to change my apache conf or use php to redirect. i've tried links like /home/myuser/products/file.mp3 but to no avail.

If i change my apache conf file won't this still allow anyone to access the files if they knew the address? Can anyone shed any light on how i might do this?

Dynamic Linking In Content
I have a query. What I am trying achieve is to do some on the fly linking. What I have is some content from a DB, and within the content if a particular word appears then I would like to insert a link to the product page.

Now I'm not quite sure the best way of implementing this. whether I should create a keywords table in the DB and then compare the content with the keywords table?

Any suggestions or examples of code?

Linking To Files Which Contain A Space
I'm getting errors when I try to view a file located on the server which has a space in it's name. For example "test file.txt" gets a link of "http://www.domain.com/directory/test ". Files with no spaces such as "test_file.txt" are fine. PHP Code:

Directory List And Linking
I found on the forum how to list and even sort a directory listing. Now I want to clean it up... but want to make it list as a link the article name, author and postdate. When I click on it it should pass the variable with the article name to a another page. Here is the code. Code:

Recordset Paging+linking To Self
I've built a dynamic page with recordset paging, loading 10 thumbnails dynamically per page. Each thumbnail has a link with a url variable (?image=whatever.jpg) to load a larger image on the page. This works great with just one page eg. page.php?image=whatever.jpg, but when I page to the next page, it's nolonger page.php, so when a thumb is clicked it loads up the original page with the image, and you have to scroll through the records to get back to where you were.

I've tried binding the recordset paging link to the thumbnail, and can get it to work, but as you click thumbs, the url is not refreshed, the variable is just added to the end of the previous url, so if you click a few thumbs you end up with a very long url.

Black Hat Or Not? Linking Technique Using PHP
I had an idea that I wanted to see what people think of it. I'm optimizing a site that is already built w/ very generic file naming and directory structure. In other words, I don't have directories or file names that intentionally have keywords in them. For the most part, its just a lot of index.php and one-word names.

So now I'm trying to figure out a way to get some keyword URL's in there w/o trashing my directory structure.

Here's what I'm thinking:

Let's say I have a link already in the page that goes to index.php. What if I changed the link to keyword_term.php, then I put the following code in keyword_term.php:

<?php
$no_spider = "TRUE";
include "index.php";
?>

index.php would then have this in the header:

<?php
if ($no_spider = "TRUE") {
echo "<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">";
}
?>

I know it seems like more work than its worth, but the idea is that in the long run, I can optimize multiple pages for different keywords, while requiring little maintanence if I decide to edit the original index.php. I'm also using the $no_spider variable to aviod being penalized for duplicate content. My intention is not to get index.php indexed multiple times, just to allow other pages to link to it using different file names.

Automatically Linking URL's
When somebody enters info into a form on my page how do I make the script I am using automatically make URL's into links?

NS 6 Linking To The File And Not The Server?
I have a link looking like this:

<a href="<?php $_ENV["SERVER_NAME"]; ?>">LINK</a>

With IE it works fine, but in NS the link is servername/file_where_the_link_is.php
How do I fix that?

Linking To A Named Anchor
I've got a PHP script for a very basic CMS which links a page to itself when a "Submit" button is clicked in a form, at the same time a variable "Number" is sent, telling the script which particular "Submit" button was clicked. The following script takes place in a PHP loop using the counting variable $i: Code:

Linking To Page.php?id=variable
I am trying to create an edit/delete user interface similar to the edit/delete section of the mysql database page. each record in the table will have an edit delete beside it.

All my attemps so far to link the 'edit' to the corresponding record bring up mypage.php?=(my calculations trying to get the record id, instead of the record id itself)

how does one go about creating a dynamic link coorsponding to the record that is needed to be editted? I have the table being created corectly, with edit/delete beside them, but I can't get the link to turn out correctly.

Compile/Linking Problem
So it seems that there still is an incompatibility between GD and
libpng-1.2.x... fine

So I installed into a dedicated directory an older version, 1.0.15

In my configure line I inserted
--with-png-dir=/my/old-libpng/path

Everything goes fine, and all once built

[patrice@localhost php-5.0.0b1]$ ldd sapi/cli/php|grep png
libpng.so.2 => /usr/lib/./libpng.so.2 (0x40350000)

The command line php is indeed linked against the "old" libpng and all works
like a charm, but...

[patrice@localhost php-5.0.0b1]$ ldd libs/libphp5.so |grep png
libpng.so.3 => /usr/lib/libpng.so.3 (0x403bc000)

The Apache module (--with-apxs) is linked against my system libpng, so any
script that calls ImageCreateFromPng() causes apache to SegFault :-(((

How do I tell apxs to link according to the configure script ?

Database Record Linking
I develop websites on the side, it is basically a hobby. An organization has approached me to develop a site for them which I may or may not take depending on one thing. This organization would like individuals within their organization to be able to access their individual information via a password protected area.

The information will contain their hours worked, hours needed for next level, credits earned,and test scores.The individual should only be able to access their information only. I use MS Front Page, and NetObjects. Is this possible with these programs and if not what is reccomended?

Linking PHP C++ Extensions With -lstdc++
I am trying to make a simple extension to PHP using C++.
(Most of the extensions to PHP are just plain C.) I am
working from the PHP documentation and this guide:

http://bugs.tutorbuddy.com/phpcpp/phpcpp/index.html
http://www.php.net/manual/en/zend.build.php

My problem is that the link command that the build system uses
doesn't include "-lstdc++" on it, leading to this error when
you actually try to use the module:

Warning: dl() Unable to load dynamic library
'/usr/local/lib/php/extensions/no-debug-non-zts-20020429/cppext.so' -
/usr/local/lib/php/extensions/no-debug-non-zts-20020429/cppext.so:
undefined symbol: __gxx_personality_v0 in
/root/php-extension/php-4.3.4/ext/cppext/cppext.php on line 3

I know the issue will be solved if I can just get the link
command to have -lstdc++ on it, because when I cut and paste
that command to the prompt, add that flag, and install that
hand-linked module, it works.

My question is how to make that happen. I have tried a number
of variations of the PHP_ADD_LIBRARY macro in config.m4 (in my
extension directory). None of them work, even if I run
./configure and even re-run phpize.

I am using apache 2.0.48, php 4.3.4, and after having these
problems initially I have upgrade libtool to 1.5.2, automake
to 1.8.2, and autoconf to 2.59. The OS is Redhat 9, with
pretty much everything stock, except I removed the apache and
php rpms and installed those from source.

The autoconf/automake/libtool build systems that I have
experience will use a Makefile.am file that is relatively
simple and it is easy to figure out where to put additional
files as you add them, includes, and linked librarys. There
is no Makefile.am in the build system created by phpize; is
config.m4 the standard place to add new source files, include
directories, and linked libraries ?

Finally, is there an example C++ extension to PHP on the web
somewhere, that I might examine in order to copy it's build
system ?

Sort_Order Linking Tables
I am trying to setup a database of all my Films/Games, and so far it has
proven very successful. But at the moment I have seperatae pages for every
letter of the alpabet (e.g A.php, B.php, C.php ...) so that I can display
all the titles alphabetticaly, (e.g. If I Click on the A link it will
display every title beginning with A.)
At the moment this works very well, but I would just like to know if anyone
out there knows some very simple lines of code which I could use so that
this is all done via one page, instead of me having loads of pages, because
when I decide I want to upgrade the database I will have to update every
page..
The pages can be found at:
http://djsleepy.servebeer.com/~plon..._database/Test/
at the moment the main page opens a new window when you click on a letter
for example, if I click on A it will open in a new window, if I click on B
it will open in a new window..I would like to keep this part as it is..

Linking To Video File?
This is more strictly an HTML problem, but as I'm also using PHP and the
HTML groups seem to be infested with spam, I'm posting it here!

At the school where I work I've got an online searchable database of
video tapes and dvds, using MySql and PHP on a Linux machine. It works
fine. I'm trancoding some of the tapes to avi files, which can be
accessed as a samba share. I'd like to put clickable links into the
database, so if a user sees the file is coloured blue, they can click it
and it plays. I've got it working, but:

Using a 'href' link in HTML code of the PHP powered web page, the file
is downloaded at the user end completely before it starts playing, which
results in an unacceptably long delay. But if a user accesses the file
directly using the samba share directory, the video starts almost
immediately and 'streams'.

How can I embed into my PHP powered web page a link that uses samba file
sharing, so it streams,

Linking To All Files In A Directory
I'm trying to do is set up a directory that will contain a bunch of different web pages and have any web page in that one directory linked on the nav.php  automatically. Lets say I have 3 files in my stuff/ directory, named file1.php, file2.php and file3.php.

In the nav.php I want a script that will generate this html for every page

<a href="/stuff/$file">$name</a>
where $file is the file name in the directory, and $name is a variable defined within the file its self.

Includes(not Linking Corrrectly)
my problem is that my a.php page is in a folder called main in the root...so the url would be http://www.mysite.com/main/a.php But when I try to have an include like include("includes/z.php"); nothing shows up...the include doesn't seem to show up. Is there anyway I can fix this?

P.S. root/main/a.php and root/includes/z.php   those are the locations of the files...so im not sure what im doing wrong.

Linking To A MySQL Result
I had it the other day but now altered the code for my real database and it stopped working.

Here is the first page which lists the 10 most recent news stories:

<?php
require ('get_connected.php');
$sql = mysql_query ("SELECT title, story_id FROM news ORDER BY story_id DESC LIMIT 0, 10");
while ($row = mysql_fetch_assoc($sql)){
echo "<a href='view.php?id={$row['story_id']}'>" . ucwords(strtolower($row['title'])) . "</a><br>";
}
?>

And here is the page that should be displaying the news story based on story_id selected by the user.....

Linking To Dynamic Extension Dlls
Hi,

I'm having problems linking to one of the dynamic extension .dll files (php_imap.dll) from the php.ini files.
I'm running PHP 4.1.1 on IIS 5 and have un commented the extension=php_imap and specified the path where my dll is being stored:- C:/WINDOWS/SYSTEM32/

When I try and run anything through the PHP.EXE with IIS I get an error alert saying that the file has not been found..... but it's definately there!!

Linking Tables To Display Data?
I want to link two tables together to create a list. The unique value
loppnum appears in both tables. I need to look up its corresponding value
for each entry.

table1 has 2 cols
A Jag
D Cht
E Lio
P Mkn
Q Res

table2 has 2 cols
MN A
PL D
RT E
PO P
LM D
NB D

In the first table both values are unique
In the second table the first value is Unique

Now I need to display a list of data in this form

MN Jag (Displays second table data and looks up value of A in first table)
PL Cht (Displays second table data and looks up value of D in first table)
RT Lio (Displays second table data and looks up value of E in first table)
PO Mkn (Displays second table data and looks up value of P in first table)
LM Cht (Displays second table data and looks up value of D in first table)
NB Cht (Displays second table data and looks up value of D in first table)

I have made a start

$upgcollect='SELECT * FROM table1 ORDER BY scfmfor'
$upg1=mysql_query($upgcollect);

$ml_collect='SELECT * FROM table2 ORDER BY loppnmn'
$upg2=mysql_query($ml_collect);

That gives me two variables with complete table data.
The rest of this is beyond me at the moment.

Trouble Linking One Table Entry To Another
I very new to PHP but like what I'm getting into. I know this is a simple question with a simple answer, and I know I must be missing something easy.

I have a contact table, which naturally lists all of our clients. When they make a purchase, we update the order table and as part of that, we need to tie that order back to their client entry. When I try to pick up and enter the "clientID" in the order table, all I get is a zero(0). Everything else populates correctly. Below are the two scripts involved. The first is the display where the ClientID comes from, and yes, it gets passed over to the second, but does not make it to the SQL statement.

Any advice would be appreciated...Sorry for the messy code...

Linking Back Into MySQL From A Return
I have a simple contact table with a catagory, name, address columns and I'm sorting it by catagory then name.

My question is after I get this return how I can make each catagory listing link back into the database to return all its members in a seperate part of the page. I can make a simple echo html table loop to return the catagory data, but how do I also include an <a> link to each catagory listing so that it will then access the database and dump it into another part of the page.

Linking Information From Two MySQL Tables
I'll pulling information from a single mySQL database table, but need to retrieve data from another table within that database and tie it with data from the first table. Simple explanation....

I have some URLS and headlines in table 'news' with category numbers for each URL. The category names are stored in the second table 'topic' along with the associated numbers. (The 'id') In the output page I want to replace the category numbers with the category names, but I don't know the syntax. PHP Code:

Linking Multiple Records From Another Table
I'm not sure I'm even thinking about this the right way, but here goes:

I have a table of users. Each one of these users may be associated
with none, one, or many records in another table I call a todo table.
table user = 'id', 'name', 'bla bla bla','todo_list'
table todo = 'id','title','other info'

Suppose user 'id=1253' has on his todo list items 756,241, and 672. I
create a string 756,241,672 and store that string in the user's
todo_list field. Then when I want to display the todo items I get the
string with a query, bust it up into an array, iterate the array and
query the todo table.

I have a gut feeling I'm making it way more complicated than need be.
But I can't think of any other way to do it

Linking Php Function In Onchange Event
i have probelm in linking php function in onchange() event. I am new to php. Im my database (test) ,i have per_det as table whic have two cloumn(eno, ename). My query is list all eno from database in combo box. when user select the eno the respective name from database should be displayed in textbox, Code:

Linking A Page With Phpbb Forum
iv been trying to do this for a while, link my website users with phpBB forum users so they only need to register once. Now someone was kind enough to give me this code to get the users information: Code:

Linking Data And Generating New Pages
i have seen websites that have data stored in databases and when a link is clicked a template page is generated with the data instead of having a separate page for every single item associated with a user. The address bar when clicked will look something like this:

http://www.blahblah.com/user/index.php?id=view&&1918373707

I have two flat file databases. One, categories with the structure --> username|catname|catid and the other content with the structure  --> username|catid|date|text

I need some code please that will make a link between the 'catid' in both databases and then do that URL thing above to link to a generated page (or template page) where i can then echo out all information. I will post the code to show you how i am producing the links that i want people to click. Code:

Linking To Update Database In Printf Statement
I have the following statement:

printf("<tr><td class="ltgrey">%s<td class="ltgrey">%s, %s</td><td class="ltgrey">%s<td class="ltgrey">%s<td class="ltgrey">%s</tr>",

$myrow["client"], $myrow["last"], $myrow["first"], $myrow["phone"], $myrow["email"], $myrow["url"]);

and wish to have the client displayed as a link so that a user can clik on it to update the information in the db. How can i do this?

Restrict Users From Direct Linking To Files
How can I restrict users from accessing my excel files or pdf files? If they know the path of a file, they can simply type the url
www.mysite.com/downloads/myfile.pdf

Linking A User 'Signup Form' To 'Service Agreement'
Can someone give me a suggestion on the best way to do this? I have created a signup form which I have linked to a service agreement (waiver). I am sure the code in simple but I've never linked php pages together before.

Here's what I have so far...
1) User choses a 'product'
2) Directed to a Sign up form (simple -name, email, phone etc.)
3) Must read service agreement and accept
4) Directed to shopping cart

My trouble is between 2 and 3. I could do the server agreement in html but then I wouldn't be have any verification that registered users actually agreed to the service agreement. What kind of script would I use in the service agreement form to verify users have accepted it?

Simple Challenge - Working With Image Coordinates And Dynamic Linking.
(*** apologies for the X-Post, but I felt it was relevant to all the
groups ***)

I have a page with a large centre-aligned image on it. I want a
functionality whereby users can click their mouse on any point in this
image and it would then show a virtual mouse pointer at the place where
they clicked it. If they were to click somewhere else, the position of
the virtual cursor would change.

The position of the cursor needs to dynamically generate a link and
display it in a form field text edit box.

If that link is then viewed separately, it would launch the same page
with the virtual mouse pointer at the location where the original
person placed it.

Basically I want to be able to have one guy point to a location on the
image for the benefit of another guy, but graphically as opposed to
relying on written explanation.

I can run CGI and PHP scripts if need be.
Easy-peasy, or can of worms?

Auto-Tab
I have a page that has 5 input boxes, the first box holds 5 characters, the second holds 4 and carries on varying in length. I need to find a way so that when a user enters the 5th char in the first box, then the cursor moves to the second box and so on...

Auto Variable
Say I have fetched these from my mysql database:

13
14
23
39
80

How do I make them assigned into an automatic variable?

Forms In PHP With Auto Tab
anyone knows how to achieve a form with at least 12 input fields that need an automatic tab since the application uses bar code reader?

Auto Calculations
I've seen on a few sites that in a shopping enviroment if you choose a price from a drop down and then maybe a delivery ares, the actual price shown for the product is updated instantly without page refresh.

Auto Run A 2nd Script ?
I have 2 scripts, After the 1st script is run/activated, i'll like it to automatically forward the result (POST) to the 2nd script ....

Auto Increment By More Than 1
I have a table that I want to automatically generate an account number. I previously developed a simple database using appleworks that allows one to enter the amount she needs to add to the ID field with each new record. MySQL does not allow for this so I figure I must add it to the PHP script. PHP Code:

What Will The Next Auto Increment Be?
I have a MYSQL table with a field that auto increments 'ID'. I need to know what the next ID will be. Is there a simple way to do this?

One solution I've thought of is to query all the records and sort it by ID, and then just take the last record +1. But that seems awfully inefficient. Does anybody have any other suggestions or know of any functions that will do this?

Auto Number
How to generate auto number for php? For example, every time I submit the details to another page, the number will add from 10001 to 10002.

Auto Backup
how will i take auto backup mysql database table data after 6 hours daily? i know that this is very easy to take backup database table or full database manualy by using mysql dump syntax but i need to take it autometicaly daily after 6 hours.

Auto Php Upload
Senario A:

I've a form actually .csv, when a user finished filling out the form,after that when user click save button auto upload the file .csv file from server A where original .csv file(testing server) to server B (life server).

Senario B:

Same concept but when user click save button,the save button disable and button upload will appear but cannot browser and it is possible to put value in input type="file"??? The reason don;t want user to have capability to browse server A(testing server).

Auto Increment
how when you have an auto-incremented mysql list? And you know how when you delete an entry, the entry's auto-increment value just gets dropped and skipped? What I need to know is if there is a way to sort of re-number the list, preferably using a Query, such as an ALTER command or something. Code:

Auto Load
I am tring to figure out how to do something. I am starting to build a collection of coomon used php class, kind of a framework but not really, that i will be using for all my site.  For instance i have a database class that handle all mysql database stuff.  I have a site class that handles html stuff(generating header/footer, form elements, etc..,

i just have all these classes included in 1 folder but it is starting get big and i would like to be able to start searating them with folders. the problem is how can i tell the auto load where the class is without changing the name of the class?

Auto Session_start();
Is there a way without code <?php session_start();?> ontop of each page to get that affect?


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