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 Complete Forum Thread with Replies
Related Forum Messages:
Delete Record - When The Delete Link Is Clicked The Next Page Is Blank And Nothing Is Deleted.
This is my "delete.php" and this "todo/delete.php?id=64" an example of a link to it generated from the index.php page. When the delete link is clicked the next page is blank and nothing is deleted. What have I done wrong? <? include("dbinfo.inc.php"); mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $id="delete from todo where id='$id'"; mysql_query($id); mysql_close(); ?>
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 !
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 !
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 !
Script Repeat Updates The Record And Also Inserts Another Record With The Same Information.
I have a form which contains some fields that are populated with data from a table. This same form also has fields that are empty because the data has not been collected yet. The main table is called client with a primary key of client_id. What I need to do with this form is select the client and update the record into a new table with the missing information. If the client doesn't not exist in this second table, I need to insert the row otherwise if the client does exist in this table because of a previous update, update the record. When I run my script, the insert works. When I try to run the script again and try to update the record, the script not only updates the record but also inserts another record with the same information. How can I write my script so it checks whether a client exists in a table and if it does, update the record and if the client does not exist in the table, add the client?
View Replies !
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 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 !
Compare Record With Session Variable And Update Record If Different
I'm trying to figure out how to create a session variable from a recordset field value in a mySQL database and compare this with subsequent values from the same field each time the page reloads. When the value of the field changes (as a result of a user update) I want to trigger an event (redirecting to another page). It's probably a very basic PHP function but I am a newbie with this language.
View Replies !
Get URL Clicked
I generate a list of href link from a DB in a page and I would like to recover wich one was clicked. I'm using a php_self script and I want this to create a session variable. echo "<a href=$Type_ress[3]?table=$Table_ress[0] target="main">Module $t_node[node]</a>"; This part is the menu and it's the pointer to the opened file in another frame but I want to save the value.
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 !
Which Button Is Clicked In Php
for example, if i have three submit buttons, submit1, submit2, submit3, in a form. and depends on which button is clicked the action will be different. in php i will simply use if (isset($_POST['submit1'])) { } elseif (isset($_POST['submit2'])) { } elseif (isset($_POST['submit3'])) { } This will work if these three submit buttons are regular form submit buttons. But if I am using image button as the submit buttons, then the above php codes are not working. So how php to tell which image button is clicked?
View Replies !
Logging A Clicked Link
Currently, I use a 3rd party shopping cart that is disconnected from my website. In other words, when a person clicks on the "Buy Now" button, it leaves my website and goes to the 3rd party shopping cart site to complete the checkout process. I want to log the instances when a user clicks on a "Buy Now" button. How can I do this? My first inclination would be to use a javascript solution such as: <a onClick="return linkClicked()" href="http://www.example.com/cart.asp?product=widget"> BUY NOW!</a> linkClicked would open a file on my server and add an entry. I've found that this won't work since javascript won't let me write to files. Is there a way to do this in PHP? Is there a way to log the clicked link and then immediatly forward the user to the shopping cart?
View Replies !
Clicked Link Text
I have created a table on the fly from mysql while($row = mysql_fetch_array($query)) { echo "<tr>"; echo "<td class='body'><a href='#'>".$row['au_id']."</a></td>"; echo "<td class='body'>".$row['au_fname']."</td>"; echo"<td class='body'>".$row['au_lname']."</td>"; echo "</tr>"; } is there anyway of getting the current clicked au_id? i would like the user to click the id to display more information but I'm unsure how to get the currently clicked id...
View Replies !
Testing If A Link Has Been Clicked...
I have this bios link on a dynamic php menu...there are two bios under bios...what i want is to test and see if the bios button has been clicked...if so, i want two sub-menu links to appear below the bios link...I understand I'll need to do an if...else here but how do I test to see if that bios link has been clicked?
View Replies !
How Can I Check The Button Is Clicked?
this is my problem. I have two php files such as a.php, b.php a.php : <?php require("b.php"); if($_GET['submit'] == "") { MainFrame(); } else if ($_GET['submit'] == "Receiving") { Receiving(); } else { foo1(); } ?> b.php : <?php function MainFrame() { ........many choices , one of them is "Receiving" } function Receiving() {<form action = "Receiving.php" method="GET"> ................ <td><select name ="Receiving_ReceivedBy">"); while($Row = mysql_fetch_array($Result)){ print("<option value ="$Row[EmployeeID]">$Row[Employee_Name] </option>"); } print("</select></td></tr> <input type ="button" name="Change_Part" value="Add"> <input type ="button" name="Change_Part1" value="Edit"> ............................... ................... <input type ="submit" name="Receiving_submit" value="Submit"> </form> } ?> What i want: after i click the button and its value is Add , do Add function to add the employee in the database after I click the button and its value is edit , do Edit function to edit the information in particular employee. Finally, i get all information and click the submit to save the data in the database. However, i dont know how can i check the button is clicked. Do i need to write javascript. Coz i am not familiar with javascript. Do i have other method? i know i cannot use type=submit again coz form cannot nest.
View Replies !
Passing Variables That Are Clicked On
I would like to write a function where, when the user clicks on the name of a person, he is taken to a bio of that person. Obviously, I only want to write one function and pass the name (which is clicked on) as a variable. I see this everywhere, but can't seem to find out how it's done. Is it just a type of form or is it done with session variables?
View Replies !
Storing Clicked Places
I am working on a website where I want the user to click on two different points on a image and then store where he clicked. There will be only 6-8 clickable points(via an image link) on the image . After clicking on the two points the user will be redirected to a different page(where the two points he clicked are shown) based on the choice of his clicks . Is this possible with PHP? If not how do u think this is possible?
View Replies !
Tracking Clicked Links
I am trying to track the links that are clicked on a particular web page. Like a typical senario will be: Track (Count) how many times the main links Home,Help,About,Login etc are clicked. At the bottom line i am planning to track(count) all the links <a href-""> how many times each one is clicked. My guess is javascript and cookies would be helpful.
View Replies !
Looking For Last Links Clicked Script
I am looking for a script that will display the last couple of links clicked on my website. Sort of like a most popular links area. Is there such a script avaiable? If not what kind of a command sequence would I need to use to develop the script?
View Replies !
Add A New Box Each Time A Button Is Clicked..
What I have, is a site where its necesary to repeat the same input box a undefined number of times, to collect a range of different prices for different styles of the same product. So leaving say.. a dozen input boxes when only 2 may be needed on this occasion is untidy, and instead I came up with the idea that we should begin with one box, and a button that creates another new box.. and when clicked again another new box, and so on. The question is, can this be done in php? My first idea was to display $n number of boxes and increase $n each time the button is clicked, but a second click negates the first, so this didnt work. Then I wanted to try populating an array with each new value, but again, it works for the first click but not again.
View Replies !
Executing A File When A Button Is Clicked
I was wondering if someone could help me. I want to execute a .reg file when the user clicks a certain button. does anybody know how to do this. i already have the file created but i don't know the code to execute it if button clicked.
View Replies !
Tracking The Clicked Anchor Text
I want to fetch the anchor text clicked by a user. Can it done with php. Deailed description: I want to create a dictionary kind of thing. Every word in the paragraph will have a link and a value which will be the cliked word will be passed to the next page that will fetch the meaning of that word from the database.
View Replies !
Update A Counter When A Link Is Clicked
I have seen some tutorials to put a update a counter field in a record. I have the counter field in a table that also has a field for a path to file. I display the records in a table on a web page e.g. IndexNo ............Title................................ Link .................................... Count ......1.............MyFileName........www.mysite/files/MyFileName.doc........ ......0 etc User can click on the Link field in the table to download the file. The problem is I can't find a way that will run an update query along the lines of $Query = mysql_query("UPDATE Resources SET Count = Count + 1 WHERE IndexNo = '$IndexNo'); when the user clicks the link Can anyone suggest a way or direct me to a tutorial
View Replies !
Determining First Time Link Is Clicked
I am currently working on a site using php and mySql with a restricted user area. The admin of the site has the ability to update messages and upload pdf files for their users. When user A logs in the messages specific to user A are retrieved from the database. Also I use a script to check the user specific folder for files and these are then shown as links allowing them to view the pdf files. Now I am looking for a way to determine when a link to a pdf file is followed the first time only, so an email can be send.
View Replies !
Load Image When Thumbnail Is Clicked?
i have a big website redesign release due in a matter of days, and the guy who was doing the CSS piked out now im doing my best going solo even though it means having tables based php pages... MY DILEMA: On the 'art' content page i had planned to have an array of small thumbnails that, when clicked, would each tell the page to load a specific image in the area (a table or whatever works) as is shows in the image where there is a white box. hopefuly the dark grey area that the image would load in, would expand and shrink (vertically) as needed (as all images would be under the horizontal limit anyway)... i would want the next image to load, to replace the previous image... is this doable? what is the bes/most effective way of going about this?
View Replies !
Admin Redirect To Link Clicked
I must begin by saying you guys are the greatest and most patient helper of newbies on the net and I am sure I speak for all of us when I say thank you. I have a member login script that is my first script, and was written following an article extremely closely. All is working well and with no error but there is one minor issue. Code:
View Replies !
The Table Is Empty After The Submit Is Clicked?
I'm a nOOb working from a book "PHP 5 and MySQL Bible" and I have a question on why the code below is not working. If you have this book, it's on page 812. There is a login screen which I was able to make work. It compares the input from one table to what was entered. It actually works. Then it sends POST info to db_logentry.php which is nothing more then a TEXTAREA box with a submit button. The ID, date, and textarea info should be inserted into the second table but it does not insert data into it. The table is empty after the submit is clicked. and It returns me back to the db_logentry.php page with a blank textarea box. Code:
View Replies !
Click Counter :: How Many Times Link Clicked
Anyone know about a script/code that count how many times a link have been clicked.. I have tried hotscripts.com, phpbank.net and so on.. Only found scripts that costs money or uses a MySQL database. I need one with no needs for MySQL. It should look like something like this: [ Download ] Been downloaded (NUMBER) times.Anyone know about a simple script to do that?
View Replies !
Display The Larger Photo When The Thumbnail Is Clicked.
I've put together a simple script to pull tumbnails from a MySql database, display them, then display the larger photo when the thumbnail is clicked. The script shows 5 thumbs per page. When you click "next" you get the next 5 thumbs. The problem is this: If you click to a second or 3rd page of thumbnails, and then click one of the thumbs to enlarge, the page goes back to page ONE of the thumbs. I would like the page to remain on the 2nd or 3rd page of thumbs, whereever the user happens to be. Is it possible to look at this script to determine where the issue is and what code I can tweak to make it post to itself and remain where it is without reverting to the page one of thumbnails? Code:
View Replies !
Execute Code When Text Is Clicked (using HREF)
I want to execute PHP code when text is clicked (using HREF). I know I can embed PHP code in the HREF, but that is 'executed' when the screen is painted, not when the link is clicked. My objective is to display a list of items, then set a session variable with the value of the clicked item, before redirecting to another page. Is there anyway of doing this or another method ? I want to stick with PHP and no JavaScripting.
View Replies !
|