Link To Form Results Page Dynamically
I have a dropdown box that pulls information from a database. What I want to achieve is that when a caller selects an option, the option determines that page that comes up.
I tried setting the form action to the name of the option, but this down not bring up anything; actually the resulting page is .php. I also tried moving the form action statement after ther selection, but that does not work either - the Submit button does not work. PHP Code:
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Output Results In Link Form
I have script that includes a query that should output a link. The link is actually an image. So from the table it will get "image.jpg" while i will be providing the full href for it so that i becomes a link. My question is how do i use PHP (or PHP with JS to open up the image according to the image's size. Thus i dont need to define a fixed size always. PHP Code:
Form Input Page To Sort With Link
I'm looking to create a page that a user can input data into a form and submit it to a mysql database. From there I want another page to display the data sorted by a certain field of the data that was entered (i.e. Year) and then be able to click on the field that is sorted by (Year) and go to another page that displays all of the information that was originally entered.
Search Form And Results Page
I have a table called "lista" into my mysql database.This table has 5 text columns : "TRANSLATEDTITLE" "ORIGINALTITLE" "ACTORS" "DIRECTOR" "YEAR" , and 1 image column called "COVER". I want to create a page with a form to search entries into this table (ex. with Title, Actors, Director, Year), and anotger php page with the search results shown inside, everyone with a link that opens a pop window (ex. 400X320). Code:
Populating Form From Database, Then Passing Results To Next Page
I have a multiple select input in a form that's being populated by a row from my database as such: <input type="checkbox" name="subm[]" value="$row[ID]"> That part is working fine as I can check the displayed page using View Source and see that the value is the correct row number from the database. It is then being submitted on a form by $_POST method to another page where I want to evaluate the checkboxes and display the contents of the entire row that corresponds to each value="$row[ID]" that have been checked. But I can't seem to get it to work. I'm having a problem passing the selected value. Can someone point me in the right direction? $query = ("SELECT * FROM `table`"); $result = mysql_query($query); print "<p>Data for Selections:"; print "<table border=2><tr><th>You chose:"; foreach ($_POST['subm'] as $value) { print "<tr><td>"; print "$row[ID]; "; print mysql_field_name($result, 1) . ": " . $row[name]."<br>"; print mysql_field_name($result, 2) . ": " . $row[address]."<br>"; print mysql_field_name($result, 3) . ": " . $row[city]."<br>"; print "</td></tr>"; print "</table> "; } if (!isset($_POST['subm'])){ print "<p>No matching entry "; } mysql_close();
Dynamically Generated Results Table
I'm trying to write a script that dynamically generates HTML tables depending on the results from an SQL query. So far, I have managed to set the HTML table headers to be the same as those in the MySQL table. [thanks to rod k -cheers !] Now i'm trying to put the results in the table. Basically, I need a MySQL function to retrieve data and put it into the table until there is no data left.... (At the moment I am using "mysql_fetch_array()", but with this it is necessary to know the names of the columns to retrieve the information for each result set. Since my table is dynamic and should be able to build itself from different MySQL tables, the column names aren't fixed and so i can't use this to put the data in the tables...)
Dynamically Create New Web Page
i'm making a cms, and I have a good portion done, I have it set up where the admin can log in and create a new post which goes to the database. I am just wondering how I can make this post a new web page? I have been trying to study how they do it in wordpress but with no avail. Anyone have any suggestions?
Creating A Link Within Table Results?
I am using php and mysql. Does anyone have any pointers on how to include links within table results that point to additional information also pulled from the same db table? I have some extensive info that I want to query. The intial results are going to be displayed in a simple wire frame html table layout. I would like each row to include a link that will take the reader to a more detailed version of the data for that particular row, and that more detailed data will of course come from the same db table. My problem is I don't know how to setup the code to create such link.
Display Number Of DB Results Beside A Link?
For an example, if you look at www.menupages.ie they give you a preview of how many results are found for each link. ie: Ballsbridge Restaurants (52) Blackrock Restaurants (17) Clondalkin Restaurants (18) Clontarf Restaurants (17) How is this achieved. I take it that it must be a select count on the DB for each row but that seems pointless, is there an easy way to achieve this?
Dynamically Create And Save Php Page
Here is my code: $filepointer=fopen("http://www.mysite.org/usersetup/newusers/" . $SESSION_UID . "/configsite.php", "w+"); $data = "<? $name = ' . $datatosave. ' ?>"; fputs($filepointer, $data); fclose($filepointer); My goal is to dynamically create a .php file with the contents of <? $name = "variable data"; ?> My code doesn't work. Something with the php page, I think. I and using similar code to populate .txt files with dynamic data, without variables, and it works file. Apparently, a quick change to .php is harder than I thought. I"ve even tried sending a simple line of data to the php page with no luck. Heck, I even tried doing it as a text file and rename to .php but it didn't like my rename.
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.
How To Dynamically Change Page Title Using Php And Require_once?
This is an elementary question, but I've not been able to find the answer, so here goes: I am developing a site using php. I have the html header information in a file that I include in all the pages using the require_once function. That is, each page includes the line <?require_once('PageStart.php')?> The PageStart.php file essentially defines the header. Omitting the boring stuff, it's laid out like so: <html> <head> <title>The Title of the Page</title> <?require_once('styles/PageStyles.css')?> </head> <boring stuff snipped> This works great. The only complaint I have is that there are LOTS of pages on the site, and using this approach means that every page is titled "The Title of the Page" When scanning my browser history, I could have surfed to 30 different pages in the site and they all have the same title. Makes it hard to know which page I'd like to go back to. I'd like to have a way to pass a (sometimes) dynamically generated page title to the PageStart.php file. I say sometimes because certain pages (the Main one for example) will always have the same title, so that could be passed statically. There is another series of pages in which the same php file accesses a MySQL database to display information about various family members, and I'd like that title to be generated dynamically (for example, "All about Mary" or "All about Ted" depending on the person being described in the page). Now I KNOW that with php there's a way to do this. I just can't find it.
Making The Results Of A Search Engine Show As A Link
I made a simple PHP search engine for my web site. the problem I'm having is that the results show as regular text rather then a link to the page found. I need to know how you use A HREF with a variable. below is the section of my code that I figure I need to modify. $row = mysql_fetch_array($result); echo ($i+1).'<strong> URL: ' echo stripslashes($row['url']).'</strong>' echo '<br />'
Dynamically Populate PDF Form
I found a free script/class online a few months ago which enabled me to populate pre-built PDF forms with data using PHP; without using any toolkits etc (it worked perfectly). It was simply a PHP script. I lost the script when my PC died recently DOH! Does anybody know where I can find such a script again? I have searched google all night, but all I find is commercial products (not cheap!) or toolkits for generating PDFs', not filling pre-built PDF forms. Here is what I am trying to do: I have built a site for a client which incorporates e-learning. Students take lessons and if at the end of the course their grades are sufficient, they download a PDF certificate. The certificate is in PDF format with Form Fields for the required data. The certificate needs to display the students name, grade and course name. I need a PHP script which can import server-side data into a PDF form which the user can then print or save (flat). The last (and lost) script did this so I know it is possible.
Add Fields To A Form Dynamically On The Fly
I'm looking to create a form the allows the user to input a simple list item by item. However I am not sure how to implement a form that allows the user to add as many fields as the need on the fly.
Dynamically Generated Form And Update Problems
In brief, in the following 2 portions of code I build a form based on data retrieved from a database. The second bit of code receives the posted data for processing and updating the database. Problem is that the update occurs for the first row of data but none of the rest. I'm using a hidden field, written in dynamically ( name="tfHiddenId<?php echo $j ?>" ) where $j is a counter var in a loop. When I print out the POST_VARS everything is as I want to be, fields all named according ly, as above. Just the update either 1) only does one row and quits or 2) updates same row with the same data over and over ( I suspect the latter ). Apparently my counter variable is not being incremented, but only on one var, "tfHiddenId".$i , on the receiving page. Here's the code for where the form is built from the DB: PHP Code:
Multiple Submit Buttons In Dynamically Generated Form
I have one big form on a page, within which is a list of text fields pulled from a mysql db. Each text field has an 'update' button, which submits the main form, and should UPDATE the textfield it relates to. The problem is, all the buttons have value="Update" and I can't think of an efficient way of passing the unique id of each record to be submitted with it. Obviously, having a hidden field for each textfield won't work because the form will use the last one displayed.
Php Page Will Not Process Link To Different Page
I have just installed RH Linux ES 3.0 (basic) kernel 2.4.21-9.EL, i686, Apache 2.0.X, and php 4.2.X. I have made no changes to the php.ini. I am trying to use the following page (code listed here) to click on link, and display 1 of three pages. The code does not seem to work, it only shows the "else" condition of the php code, which is page: "stuff.php". What do I need to do to my apache/php config to get this to work? Of course I copied this code from a php site tutorial somewhere. Page code below: <? if ($link == page2){ $page="files/page2.html"; } elseif($link == page3){ $page="files/page3.html"; } else{ $page="files/stuff.php"; } ?> <html> <head> <title> index.php </title> </head> <body bgcolor="#999999"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td colspan="3"><h1>The Template (index.html)</h1></td> </tr> <tr> <td align="center" valign="top"><a href="index.php?link=index"> Page 1 </a></td> <td align="center" valign="top"><a href="index.php?link=page2"> Page 2 </a></td> <td align="center" valign="top"><a href="index.php?link=page3"> Page 3 </a></td> </tr> </table> <? include($page); ?> </body> </html>
Dynamically Populate Drop-down List And Dynamically Include Html File
We have a drop down list on a PHP page, with several product names, and when people click one item, we will refresh the same page with the product name as parameter, and in turn we want to include a HTML file into the content area of the same page. I know it is recommended to put everything into database, but we want the web site to be very "portable", so the drop-downlist and the content should both in text files. Let's say the drop-down list will be poplulated from the product.txt file, and there will be a file for each corresponding item in the drop-down list. From the user point of view, if he wants to add a new product, he will just need to open the product.txt file, and add a new line with the product name, "Laptop", then add a new text file named "laptop" in the same folder which contains the HTML fragment to be included in the content area. What is the easiest way to do this?
Check For Link In Web Page.
I am putting a form on my site that will allow someone to submit a link to me. If they have a return link back to me it will effect the way I display thier link. Closer to the top of the page. What do I have to do in order to see if my link is up on the page they submit.
Redirect At Other Link Page
by php which the fast solution for make redirection at homepage ? Time ago read some solutions, but one most fast because not load or not make a reload of itself page, not remember exactly but was a solution more fast...
Link Display On Same Page?
I want to list the titles of all my articles from my database onto my webpage at articles.php. Then when the users click on each title, the individual articles will load on the same page. I'm new to PHP/MySQL, so here is what i've done so far. row[0] as my unique id numbers for each article, and i've included it so that i can somehow tell the page to load the article related to the unique id number. Is this all making sense? Code:
Changing A More Link Into Page Numbers
I have the following code which I've tried to edit to fit some examples others have posted on here, with no luck. I have a page that displays More and Prev links but not the page numbers. How can I change this code to have page numbers instead of the More Prev? PHP Code:
Home Link From Navigation Page
I got a code which helps me to create navigational links and only show 4 results per page. Now I want to add a link on each page such that if anyone clicks on that link it takes it to HOME page. I have added <a href="Home.htm"><b><font size="4">Home!!</font></b></a> inside the loop that generates NEXT and PREVIOUS page link but whenever I click on HOME it does nothing at all.
Using A Link To Change Page Content
Basically I have a page to enter data into a mysql db via a form. After the data has been input, this form disappears and instead (on the same page) the data is shown in the same format, just not editable anymore. What I need to do is have a link that will be able to switch between the two states, being 'edit' and 'view'.
Open Link In Included Page
How to include Link that could open in same page rather than going to another page for example, if i include a file in home.php <? include("/index.php") ?> and I want to open up the LINKS in "index.php" in same home.php. example - open "/index.php?p=Hits" on same home.php page I know i could have FRAMES but i dont want to frames in my site
Multiple Page Link Exchange
I am in need of a PHP Link Exchange script (preferably free) that is not for single pages. The use of this script will be for having 4 pages on the website - the home page with paid links for $1, and then 3 other pages for free link exchange (Free Links Page 1, ...2... and so on) If you know of a script out there then please post a link to it here. It would be a huge help to me and I greatly appreciate it. I saw one almost a year ago on the HotScripts Most Poplar page, but cannot remmeber it nor find it in HotScripts now.
Link To Local Files Through A Dynamic Page
I decided to flesh out my php skills by building a web application which could scan through local files on my intranet (specifically mapped drives on my server) and generate a list of Movies or pictures or music, etc. Which worked fine, I created the code to do that and to store the results in a mysql database. I can even print it out to a ..php page and sort it however I like. What I can't seem to do is to create links to the data I've indexed in a way that will let me open them from the generated php page. I've searched and searched and there just doesn't seem a way to do this. I'm pretty sure I've exhausted the obvious options. The following trials did not work when the document was served from an apache web server. <?php echo "<h1><a href=file:///c:/temp.txt> HEY </a></h1>"; echo "<h1><a href=file:///c: emp.txt> HEY </a></h1>"; ?> <a href=file:///c: emp.txt target="_top"> temp.txt </a> <a href=file:///c:/temp.txt target="_top"> temp.txt </a> When the same page was loaded directly from the file instead of served through apache the bottom two links worked. This doesn't really help me however. I need to be able to dynamicly generate pages that link to the files. I've read that browser security is the restricting factor in this but changing all of my security settings in IE to low didn't seem to affect it (not sure what the equivalent of security settings is in Firefox). Does anyone know of a way to link to local files directly in a way that lets you open them directly from the source instead of by downloading them to a temp file or saving the file to somewhere locally? Is it even possible in PHP?
Having Different Results On Same Page
I have a database that I would like to use to display the contents in different lists on the same page. In other words, I would like a list of the latest 15 entries in the database to appear in list...then I would like the next 15 to appear on the same page but in a different list structure, etc. I have this so far, but it only displays the latest 15...I am stuck on how to get another list generated from the same query: Code:
Making A 'Go Back' Link From An Errorous Feedback Page
I am working on a 'contact' page on my website. All the code is in contact.php When $name, $email and $message are uninitialised, the page loads with all the input fields. If they are initialised, the page checks for errors. If there are no errors, a "success" message is displayed. If there are errors, the errors are displayed. In addition to displaying the errors, I'd like to have a link which goes back to the input fields (i.e. contact.php without $name, $email and $message initialised). Making a link to contact.php does not work, as the variables are still initialised, I think, and therefore all the error messages are just displayed again. Hitting 'Back' in the browser works well - how do I make a link 'go back' though? (I think I saw some javascript 'go back' commands a few times before...) Hitting 'Back' in the browser unfortunately resets/clears all the fields, if something was typed in. I'd like it if the fields would not be reset/cleared. Could I please get some advice on how I can solve this problem please? If I need to use cookies, sessions or something like that, then just let me know how I can make a 'go back' link - I don't know how to use cookies / sessions atm, and right now I don't feel like learning to use them.
Encrypting Variable Values Passed Thru A Link In A Web Page
I am working on a project in PHP / Mysql on linux platform. The project has a login page where any registered user is supposed to login before he/she can have access to some major functionalities in the project. Since I need to check the authenticity of the user in other secured pages, I have to carry forward the username with which he/she has logged. As I am doing so, the username is appearing in the url. This of course is a major security lapse.
Get A Variable Form The Url And Use It In A Link
I have the url http://www.mydomain.com/admin/admin_modjob.php?idr=3&table=jobs I would like a link on the page that goes to http://www.mydomain.com/admin/printquote.php?idr=3&table=jobs how do i go about doing that? is it a $_GET funtion?
Use Arrays To Page Through Results?
I've got a search facility that interrogates an SQL database then shows the results 30 at a time. Currently, when you go to the next page of results it has to run the query all over again, because there is no way of handing the resultset to the PHP file. So I wondered if there was another way of doing it. I'm tempted to use mysql_fetch_array and create a multi-dimensional array full of result rows, then hand that around, but so far cannot find out how to hand a PHP array as a variable to a PHP page. IS this possible, or am I barking up the wrong tree? Or is there a better way of doing this?
Multi-page Results....
I'm working on an engine to search a MySQL database of a bunch of forum messages. The PHP code retrieves the results from the database, then stores them into an multi-dimensional array for processing. Once stored, the code parses each result and assigns it a relevancy score, and once all of the results are scored, it then sorts all of the results according to relevance. The end product off all this is an array that holds all of the retrieved messages relevant to the search, holding such information as title, author, date, msgID, blah blah blah. now that i've kinda explained what's going on, i'll get into the problem i've bumped into. Being that there's roughly 16,000 messages in the database (not to mention the 800,000 lines of message text) that could possibly be the results from a query, displaying it all on one page is most definately out of the question (it still takes a few seconds to load on my cable line with only a few hops to the T3'd server. I'd hate to see what a 33.6 or 56k user would be waiting for). The real problem all comes down to: how am I going to pass the results from one page to the next? an array of a few thousand messages is a *little* large for an http post action, and storing the results in a table in the mysql database posses a few problems as well (namely, how long to keep the table around after the user has executed the search. temporary tables are out of the question, as they die as soon as the mysql connection is closed, but a persistent mysql connection would create exactly the opposite problem: ei, temp. tables never die).
10 Results Per Page But From Different Categories
I have a script that shows a list from a different category depending on what is in the URL. I've got it to limit the results to the 1st ten results and keep the chosen category in the link(?category=differentcategory) but when next page is clicked it repeats the same ten results. Code:
SQL Query - Results From Another PHP Page ?
Can I store this PHP code in another page, then refernece it on multiple pages using Require or Include ??? //results from sql query for ($i=0; $i<$number; $i++) { $ID = mysql_result($result,$i,"ID"); $CompanyName = mysql_result($result,$i,"1"); $ContactName = mysql_result($result,$i,"2"); $Phone = mysql_result($result,$i,"3"); $HomePhone = mysql_result($result,$i,"4"); $MobilePhone = mysql_result($result,$i,"5"); $AltPhone = mysql_result($result,$i,"6"); $SecondContact = mysql_result($result,$i,"7"); $SecondPhone = mysql_result($result,$i,"8"); $ThirdContact = mysql_result($result,$i,"9"); $ThirdPhone = mysql_result($result,$i,"10"); $Notes = mysql_result($result,$i,"11")
Getting Other Webpage Results In To Php Page
I Have a page which will take authentication from a diffrent page from a difrent website. My program needs to call a page like this from php page lets say: http://www.abc.com?handshake.jsp?us...htoken=94399843 my php page is at www.xyz.com based on this url's response i need to print the result on my php page? I tried this.. $url="http://120.126.79.21:6080/AutoPrintWeb/apvalidator.jsp?tempid=$tempid&authtoken=$authtoken&ipaddress=$rmtadd"; $fp = fopen($url, 'r'); $response1=stream_get_meta_data($fp); print_r($response1); The reukt is like this: Array ( [wrapper_data] => Array ( [0] => HTTP/1.1 200 OK [1] => Server: Apache-Coyote/1.1 [2] => Set-Cookie: JSESSIONID=B55CA82D1790D6C0A9E20ED1CEDBB1B9; Path=/AutoPrintWeb [3] => Content-Type: text/html;charset=UTF-8 [4] => Content-Length: 382 [5] => Date: Fri, 10 Mar 2006 10:22:41 GMT [6] => Connection: close ) [wrapper_type] => http [stream_type] => tcp_socket [mode] => r+ [unread_bytes] => 382 [seekable] => [uri] => http://193.186.79.21:6080/AutoPrint...dress=127.0.0.1 [timed_out] => [blocked] => 1 [eof] => ) I need only sucesss or fail..
Return Results On One Page
i have a search field on a .php page. i want to return the results on the same page i.e i dont want the action to point to test2.php but test.php which is were my search filed is sitting at the moment. how do i do this? i got this on my first page: <form method="post" action="test2.php"> Name: <input type="text" size="10" maxlength="40" name="name"> <input type="submit" value="Send"> </form> and this on the second: <?php $name = $_POST['name']; if ($name=="Friday") echo "Have a nice weekend!"; elseif ($name=="Saturday") echo "Tomorrow is Sunday!"; else echo "Please enter Friday or Saturday"; ?>
Limit Results To 20 Per Page.
I have a Database and script where it SELECT * FROM my database and lists the info on my website. I want to be able to limit the quary to only 20 per page. Here is an example of what i am talking about on this page http://sacvalleyhomes.com/Sacvalley/property_inquiry.php Everything listed under Property Inquiry is genarated be my database. As it is now i have 5 diffrent tables for 5 diffrent pages. This is way to much work to keep updated. What i want to do is put all 5 tables in to 1 table and have my php script only show the first 20 listing then generate the page numbers on the bottom or some way to view next 20 results and so on. Code:
Results Only X Number Per Page...
am doing a real state site and when searching it shows all the results from the database in one single webpage, can you help me with one easy way to show only 10 results per page? I've seen some complicated sites with previous and next arrows, i only need to show 10 results then a link to show next 10 and that's it.
Limited Results Per Page
i have a download section for my site, with about 20 downloads, and i was wondering if their was a script so that it would only show 5, and clicking 'next' button would show the next 5 etc.
Html Page Link Prints Path 3 Times In Header
I have a website with html pages and a php page (a form). I just put in links on the html pages to the php page. When I click them I go to the php page and as bonus the path of the html page is printed at the top three times. (The text in the php page changes depending on which page I have hit the link from.) For example: Quote: http://mysite.com/sitefolder/previouspage.htmlhttp://mysite.com/sitefolder/previouspage.htmlhttp://mysite.com/sitefolder/previouspage.htmlhttp If I highlight and then delete this text in Navigator or Explore both browsers return me to the page written out three times at the top of the page. Here is the code that is giving me this result. Code:
How To Detect Which Link Was Used To POST A Form
Have a PHP script that reloads itself into one of two modes, depending on which text link you click on. Right now it's done using the GET method, by appending different variables to the URLs, but I'd like to convert it to POST if that's not too hard.
Submit Form Via A Text Link
But I have a few input fields, but the submit button is not a button but just a text link. How can I create the text to act as a submit type to submit the form?
|