Identifying Opening Link For Database Query?
I've got a tricky problem i need to solve, i'm building a banner exchange type site in which there are already about 100 banners so i've had to code things around what already exists to a certain extent.
Now each of the banners that go out on other sites have a link on the banner which pops open a window with details of the banner. this would be fine if all my banners were gifs and jpgs but there are also swf and dcr banners so i have no real control over the actual link on the banner. up until now each banner had a html page made for it so when you clicked on a banner it would open a page banner_1.html which had the details of that banner. for obvious reasons i'm going to replace all these redundant pages and put a htaccess redirect at their url to all redirect to a common page popup.php so all details will be dealt with in one file.
ok this is fine but my problem is in this page popup.php i need to identify the link that just opened the window so that i can then get the info from the database to put on the page..
remember i can't use the url like so...
bannerpage.php?thisbanner=1
but all existing links have unique addresses, is there a way to do this, i'm pretty sure there must be but i can't get my head around it?
View Complete Forum Thread with Replies
Related Forum Messages:
Link Opening In New Browser
I'm not to familiar with php but My whole site is done just in html and java, but I made a guestbook in php from my hosting company. I added a link so the user can get back to my homepage from the guestbook. But it keeps opening the link up into a new browser rather than just going to the homepage from that page. I think it has something to do with my guestbook being in another folder withing my ftp site rahter than with all my other files.
View Replies !
How Do You Query A Db From Link Text?
I was wondering how I would go about doing this. I would like to return some items from a database depending on what a user clicked. I would like to just use the link text that was clicked on. Then I would search through one field in each record to see if it matched that text, if so, I would display it. I'm not sure how I could give each link a value though. I would like someway to get the link's text and use that to search a database. Thanks in advance for all the help!!!
View Replies !
How Do I Query With A Hypertext Link?
I have a script that queries a real estate database for properties on specific lakes - when run within the script it might look like this: $query="SELECT * FROM properties WHERE water='Bass Lake' ORDER BY price ASC"; how to I query using a link? The link below doesn't work, but should it be something like this?: http://mysite.com/getlake.php?water=Bass
View Replies !
Link The Query Results?
Imagine I have a select query which returns various records, let´s say 20 lines. I have for example columns named place, name, club, points. I do a search with some form values and it returns the results on a normal table bellow, this is how it works now. Is it possible to make each line of the result clickable, so it can open a popup with details about that specific line? Let´s say I wanted to see details of one club (it´s another table) by clicking a line in which that club is presented.
View Replies !
Next And Prev Link From Mysql Query
I'm making a PHP/MySQL photo management site for my photos and want to have a link to the next and previous photo on the bottom of each page. I can't just increment the ID (autoincrement key in DB) since link swill fail if any photos entries have been deleted, plus if I decide to add an old photo it won't be in order. If I just use date less than current id's date for previous link what would happen if I had two entries with the same time? I'm just trying to figure out how I can do this and was wondering if anyone might be able to offer pointers. If i set $date and $id from the current entry and query the database for entry WHERE entry_id does not equal $id and entry_date =< $date and is returned if there are no entries returned? I want to use an if statement that does not hyperlink if there is no previous entry The code below does not return a value for $id_prev PHP Code:
View Replies !
Sign-in Link To Database?
I am building a website for a friend and in the website we want to have a login area for the members to type in there password and username. The username and password are in connection with the phpbb2 forum we are running. I'm curious as to how I would create a sign in area for the members to use on the main page that would be linked with the phpbb2 database. How would this be possible? I've asked on other forums and no one has helped yet. I figured I would try here and see if anyone could give some suggestions.
View Replies !
Link Indexing / Database Script?
I've been searching forever to find the right free script for my website. I want to make article/link database on my gaming site... here is an example... Click me. I want it to function nearly exactly the same as this (but I'm aware this is done in asp) I want user to be able to add to the database & rate the article/link (with a 5 star rating if possibe) and add a comment/review (again if possible) Many large sites seem to use the same kind of system... so there must be one out there! I want to use the database for my links page. Also I have pages were I have written articles... I want to add "user articles" underneath... which will show a catagory from the database. So I'd say the script would come under the catagory of link indexing or reviews/ratings... or database lol The reason why I need it in php is because my pages contain php include commands, that include news from my forum... If I used ssi to include instead what scripts could I use then? Seeing as I'm having no luck finding a php script I can use. One last thing... I would need to be able to edit the design... so it will fit nicely into my site.
View Replies !
Link Entry In MySQL Database
i have a database with rateid, bandid and a rating, how can i like each bandid to different pages, so bandid 1 will link to bandid 1's profile page and bandid 2 will link to bandid 2's profile page. any ideas?!
View Replies !
Database Design - Best Way To Link Tables?
I have a table "account" that stores my users accounts. Each user may add one or multiple paypals, bank account, credit card, and so on. Let's name the tables "paypalAccount", "bankAccount", "creditcards". The tricky point is that I need to store their ID's in a column (linkID) of a table (in this case the table "deposits"). What is the best way to link theses tables?
View Replies !
Auto Creating Link From Database
I have a table in a MySQL database which is called "Points". In this table are the rows "First/Last name, Points and tutor". I call the table to a PHP file as follows: while($row = mysql_fetch_array($result)) { echo $row['FirstName'] . " " . $row['LastName'] ." ". $row['Tutor'] . " " . $row['Points']; echo "<br />"; } What I want to do, is there to be a link which is automatically generated for each one, directing to the "add points" page. For example addpoints.php?Firstname=Nick&Lastname=Nick&Points=3 using the _GET and _POST function. The code that would be executed in addpoints.php would be: mysql_query("UPDATE points SET Points = '$_POST[points]' WHERE FirstName = '$_POST[firstname]' AND LastName = '$_POST[lastname]'");
View Replies !
Question On Having A Link Show Up In My Database
I have created a Database that will list a list of items I have on a character from a Video Game. And I used a program called PHP Generator to generate a PHP Page that pulls this Database info and displays it in a site. That can be viewed here <snip> Now my issue, is as you can see for the Link Column. I am trying to make that be just the word link and click able to open the link in either the same or new window.
View Replies !
Problems Getting The Database To Accept A Link
I am creating a new database to store my links and files rather than simply updating them in an include file. I use phpmyadmin and am having problems getting the database to accept a link that is over 200 characters long (some of them are extremely long, as some of them are deep in my folder list, and some include a couple of paragraphs of text to display.
View Replies !
Identifying Browser
Is there a way to identify the brwser a visitor to my site is using? I would like to include site style based on the visitor's browser. If their us IE show layout one way, if their using Firefox show it another way...etc...etc.
View Replies !
Identifying People
on my website i'm finding people are coming back and signing up again and again... how can i log them so i know who has logged in before. was thinking IP but does this not change per session online with dial up?
View Replies !
Identifying A Value Range
i have a form that submits to a php file, the form basically has a hidden field called number: <input type="hidden" name="number" value="12"> i know how to read the value of that, its simply putting <?php echo $_POST['number']?> but what i want to do is check if the number is between 1 and 25 and if it is then echo A else if it is between 25-75 then echo B else if it is anything above 75 then echo C .
View Replies !
Identifying SSL Clients
I have a site that uses PHP sessions through SSL, my employer does not wish the site to require cookies so I have switched on the use_trans_sid option for users who have cookies disabled. The problem I have is stopping session hijacking. If I am on a page "https://secure.mysite.com/page.php?PHPSESSID=XXXXX" And I email the url to someone else they can get onto the site without being challenged for a logon. I am trying to find a way to check that the connection is still coming from the same SSL connection, e.g. by checking the clients public key, but I can't find a way to get any information about the SSL connection from PHP.
View Replies !
Identifying An Image
Ive got a tracking system which tracks how many times a user clicks on an advert on my site. At the moment all the listings are set as one so when a user clicks on that advert it gets one click. However, one of the adverts is now going to contain two images advertising two separate companies. Ive set it up so the images and urls are different and they go to their own websites and in my tracking table i have just added an extra column called image and the number 1 goes in if image 1 is clicked on or 2 if image 2 is clicked on. However, to display this is the bit im not sure about. At the moment its displayed in a table like this: Advert Name Category Number of clicks Advert 1 Shopping 257 However, if advert 1 has two images, meaning two separate companies, how can I show this in the above table?
View Replies !
Navigating Database Results And Problem With Link
I am loading results from mysql database and displaying on my page and then dynamically displaying only 5 results per page. On each page I have a POST button so that if user wants to POST something on form he should be able to do it whether he is on page 5 or page 1. When I first time loads the results on page 1 this POST button works fine but when I go to page 2 and click on POST it gives following error " CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: " and then even if I go back on page1 it starts giving me same error.
View Replies !
Identifying The Clicked Record
i already know how to load the my list of suppliers using mysql/php/apache, but what i would like to do now is put a link for each and every supplier and when someone clicks it, they will automatically go to that supplier's list of products. i want something like this: SUPPLIERS TABLE supplierID, Name, Address, AA Alfin21 1506 w. 66th street <>EDIT<>
View Replies !
Identifying Search Engines
my website is pretty much database driven and i've typically parsed the data in PHP and just output flat HTML. however, i'm trying to save some badwidth by spitting out just the critical information, and have javascript parse out the data. however, i'm kinda worried how search engines would react to this. (especially google) would search engines ignore the keywords if they are inside javascript tags? how do i detect search engines? maybe i can just setup a special script that output's "search-engine-friendly" output.
View Replies !
Identifying Black Images
I would like to be able to identify completely black images in order that I can exclude them. I am thinking I could use gdlib but I cannot find a suitable function. If I can find the rgb of the image then I can exclude it.
View Replies !
Identifying Individual Users
I know that you can identify users using an ip address. But what if you have several users with different computers in one room sharing the same ip address. Is there anyway to differentiate each individual. Is there a unique signature from the computers that can be used?
View Replies !
Identifying Parts Of A String
$url = /blah/elephant/spaghetti/page.php This gives you the whole path. But how can you identify each directory in the url individually? ie. I want $one to equal 'blah', $two to equal 'elephant' etc.
View Replies !
Identifying Off-site Links
Is there an easy way to identify off-site links using php? For example, on a forum site like phpbuilder.com, I'm looking for code to flag posts that contain: Code:
View Replies !
Identifying A Page Via Hyperlink
I have a page (product_wide.php) that displays sale items. In that page, I "include" a 2nd page that contains hyperlinks to general item categories. The hyperlinks in filternavbar point to product_wide, and display items from the category selected. I need a way, using the same hyperlinks I am using now in filternavbar, to tell, from product_wide, that it was from filternavbar that the link was clicked (as opposed to some other page in the site that takes you to product_wide. I can't change the configuration of the filternavbar url because of duplicate content issues with google.
View Replies !
Simple A-Z Link List For Searching Mysql Database
I'm trying to set-up a simple A-Z list so that people can search a mysql database by each letter. Click on "A" get all records in the DB that start with "A". I have it working no problem but i want to be able to add "#" so that the user can get all records that start with a Number. For some reason the query i'm running won't grab any records that start with a number? here is the query:
View Replies !
Create Multimap Link With Database Field Values - How?
I've got a MySql database that stores (amongst other things) a latitude and longitude for a place. I want to create a hotlink on my page listing that links to a multimap.com map for each record. For example, for 10 Downing Street London, Multimap use the format: PHP Code:
View Replies !
Large Link-Ranked-Database-script Not Working?
i am not sure if its just a parse error , but it doesnt say theres a parse error, and i cannot find anything wrong with the script. But when i start it, nothing shows up, although it use to before but after some parse errors i fixed it and now the whole script won't show. Just a white blank page which i have tried days trying to figure out why. Code:
View Replies !
Cannot Retrieve Database Entry When Digits Are Part Of The Link
I have been trying to figure out why a link such as: /my-link-1234-test.html is not picking up the database entry, which is "my-link-1234-test" BUT when the database entry is my-link-one-two-three-four-test.html the entry is found without any problem when clicking on the link. The issue is related to the digits since when the link does NOT include digits, it all works fine. I wonder if the issue comes from my php SQL filter, which looks like this: SELECT * FROM article_content WHERE articletitle LIKE '%%%s%%' I have tried to edit the "%" characters in many ways but still no luck. Any help would be appreciated since I cannot figure this out.
View Replies !
Identifying Dynamic Form Fields
User goes to page which is a form that asks for some basic info regarding returning products for credit/exchange, and also asks for how many products are going to be returned. Upon submitting, a return authorization form is presented to them with the specified number of product fields. I now want to take the input from this form and email it to myself, as well as, display a confirmation page to the user. The problem I have is a can't say, for instance, echo "$field_name"; because field_name will get created dynamically after the user specifies how many products to return. For example, say the user says 5 products, this will generate a form with field names like: return_code0 inv_num0 qty0 product0 cre_exch0 stockout0 return_code1 inv_num1 qty1 product1 cre_exch1 stockout1 return_code2 inv_num2 qty2 product2 cre_exch2 stockout2 and so on.... These get created with a for() loop. Once this form is submitted, how can I address the field names? Code:
View Replies !
Identifying Non-Supported Characters In A TTF File With GD?
I've managed to get GD working (mostly anyway) on my site - and am utilising the "imagettftext" function. I am using this function to display individual characters on my website - with a nominated Font. However, sometimes the characters in my StringText are not supported by the particular font that I am using ... Directly from http://www.php.net/manual/en/function.imagettftext.php imagettftext - "If a character is used in the string which is not supported by the font, a hollow rectangle will replace the character." Can anyone suggest some code that would: 1) compare/look at the StringText supplied within the "imagettftext" function (in my case the StringText will comprise of a single character only) 2) where the supplied StringText (ie character) is NOT supported by the font, then I need for that character to be reported as not supported. ie. either; return a flag or skip the non-supported character entirely - rather than displaying the standard "hollow rectangle".
View Replies !
Identifying Auto Increment Values For Each Of The Fields
I have set up a database i mysql, identifying auto increment values for each of the fields (eg AdminID). I was wondering how i can set up a form which will, when i go to add a new member, have the autoincrement value already present in the field and i can continue to input the rest of my data as usual.
View Replies !
Identifying User's Pick From Selection List
I have an application that uses PHP to access a MySQL table and extract rows which match the user's search entry. Data from the matching rows are loaded into an HTML selection list, and the user can scan the list and highlight a selected item. My question: In PHP, what is the syntax for identifying which row is highlighted? My goal is to pass the unique row ID of the selected item to a subsequent form where all the fields will be displayed for the user to edit. I already have the code that loads the selection list and the code that displays the fields. I just need to know how to determine the highlighted item. I have two PHP books, and both discuss loading the selection list, but there is no mention of what to do next.
View Replies !
Form, Type=file And Identifying By Isset()
Windows XP PHP 4.4.2 Apache 2.2 Register_Globals = Off Safe_Mode = On ----------------------- Hi All, I am having a problem getting a file browse input field to be recognized on the next page. Let me show you... page1.php Contains a web form with a file input to attach a file using a browse button. <form method='POST' action='page2.php' enctype='multipart/form-data'> <input name='uploadFile1' type='file' id=uploadFile1'> page2.php contains a validator to check the input and perform an action based on whether or not the browse input field has been populated. // IF THE POST CONTAINS A FILE UPLOAD, PROCESS SECTION 1 IF NOT PROCESS SECTION 2. if (isset($_POST['uploadFile1'])) { echo "File is attached so print this."; } if (!isset($_POST['uploadFile1'])) { echo "File is NOT attached so print this."; } If the user uses the browse button on the form page to populate the field with a file path to a file on his pc, then I expect to see the "File is attached message". However, regardless of whether someone does or does not browse a file, the message is always that they have NOT browsed a file and the variable "uploadFile1" is effectively left unpopulated. OUTPUT File is NOT attached so print this. Conversley, I thought I might be able to use the _FILES variable instead of _POST, but I get the exact opposite, that the browse field is populated all the time whether or not someone has browsed a file or left the browse field blank. if (isset($_FILES['uploadFile1'])) { echo "File is attached so print this."; } if (!isset($_FILES['uploadFile1'])) { OUTPUT File is attached so print this. So, I am missing something. Can someone give me some direction so that I can simply identify (with register_globals = Off) whether or not an input field (input type=file) has been populated or left blank? Is this even possible? What am I missing?
View Replies !
Voting System - Identifying Voter And Integrity Of The Vote
I am trying to setup a voting system for our intranet (staff awards - free text fields). I have the database adding the votes no problem. What I would like to do however is the following: 1. It's our intranet, there is no need for each person to login so it just uses "user/user". However I need to capture the person's login on the vote record so I can identify who voted. 2. restrict the users to one vote each. I have done some research and it looks like I have to create a cookie.
View Replies !
Identifying Different Unicode/utf-8 Types Inside A Text String
I am dealing with a script that reverses a string that is in hebrew, so I can display it properly when I write that string onto an image, however sometimes the string might be half hebrew half english, so I need a way to identify what language is in the string and only reverse the hebrew parts. in technical terms the hebrew text is encoded in utf-8, and the english text will be encoded in the normal encoding for english, (anscii, latin-swedish whatever, i dont know the name of that encoding) so the simple question is how do I identify different types of encoding within a string? that way I can break up the parts that i identify as being utf-8 and reverse only those (yes I am well aware of methods to display hebrew properly in php, but when writing to an image this is another story, only method i found so far is reversing the hebew text string)
View Replies !
Getting Database Name For A Given Query
In PHP you can retrieve the table.column name of a MySQL query doing something like this: $result = mysql_query($query, $dbConnection); $resultArray = mysql_fetch_row($result); $i = 0; foreach ($resultArray as $data) { $tableName = mysql_field_table($result, $i); $fieldName = mysql_field_name($result, $i); $returnVal["$tableName.$fieldName"] = $data; $i += 1; } The problem is that I am selecting across databases and it is conceivable that two tables will have the same name. How do I get the Database Name for a given field? I would want something like this: foreach ($resultArray as $data) { $dbName = mysql_field_db($result, $i); $tableName = mysql_field_table($result, $i); $fieldName = mysql_field_name($result, $i); $returnVal["$dbName.$tableName.$fieldName"] = $data; $i += 1; }
View Replies !
Database Query
Needing some assistance with Joining some databases together for result display. I have been reading some of the JOIN topics in the forum and I am still somewhat lose when it comes to my example. There will be four different search types (center_name, city, state, and zipcode), obviously each search will be conducted based on that type. my main table looks as follows: center_id, alley_name, alley_address, city_id, state_id, zip_id, alley_phone, alley_website, alley_email When I go to list based on the search term, I need to be able to pull the city, state and zip IDs from each of 3 seperate tables and create a listing that may have 1 to 50 or more results.
View Replies !
Query Database
I have 3 forms all located in 1 page. The code is below. All these 3 forms have got their form action pointing towards Untitled-3.php. The code of Untitled-3.php is also below. Now here's what I want to achieve. I want each form to query different fields individually. Explained slightly differently, form1 should query the add_1 field, form2 should query the address field & form3 should query the price field. I've already got form1 to query the area_1 field successfully by using the code below: Code:
View Replies !
Database Query + Int Value
When creating a database query should an int value be inside quotes?? e.g. $query = "SELECT * FROM tbl WHERE id = '$id' "; Is the above the correct way or is this one correct... $query = "SELECT * FROM tbl WHERE id = $id "; id is stored as integer in database
View Replies !
Logical Database Query
I currently have 2 tables in my database. One called "members" and another called "phpbb_users" (which is the user's table in my forum) Basically I want to get all the results from my members tables and then automatically insert the values into the phpbb_users table. I have the following code below which I am trying but doesn't work. Can anyone offer a little support on this? Code:
View Replies !
Query On Database Send
If I do a select query in php, how can I direct the info into a csv file or excel file instead of printing to the screen. e.g. select * from tbl_name where last="Barr"; // send to page
View Replies !
Database Array Query
I would like to assign my database values in an array format. For example, if my query will return three values, I would like the following: $fname[1], $fname[2] and $fname[3] How can this be done? Below is the code I am starting with: Code: $query = "SELECT * people WHERE address=$address"; $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($result)){ echo $row['fname']; } However, I need to be able to select a specific $fname (first, second or third value).
View Replies !
How To Do A Query To Database Using Ajax
I am doing a shopping cart. the "add to cart" button is on the left, and the view cart section is on the right, i want to do something like click the add to cart button, then on the right, the view cart section auto update without refresh, i do know how to do a query to database using ajax, but in this case, the view cart section is taking data from session, not from database, what shall i do?
View Replies !
|