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


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Enter A New ROW After 3rd Image For 5 Rows And Then New Page For Remaining Results


I want to show 3 images per row and show 5 rows per page, that would be 3 images X 5 rows = 15 images. per page and then press next to go to next page to see if there are more images for that user. This is a script for making two users friends of each other. Code:




View Complete Forum Thread with Replies

Related Forum Messages:
Pagination :: 10 Rows Per Results Page
I am trying my hand a pagination. There are 13 rows from the database which are being called. I have requested 10 rows per results page. The pagination says there are 2 pages but both pages contain all 13 rows. The limit of 10 is not working. Code:

View Replies !
Only Enter Results If Date Has Passed
I have a PHP match result system. I do not want the user to enter the result if the date has not passed. If the date has passed then $played = 'Yes', If not then $played = 'No'.

I read the date and time values of the match from the database. I then need to validate them. I could use the system clock BUT somebody could simply move the date on their machine to beat the system! Is there any other way to solve this?

View Replies !
Upload, Resize And Enter Image
Can someone point me to a good tutorial or script that can show me how to Upload an image
Rename that image If the image width is greater than lets say 300px, resize it back to 300px Enter the image name into a table in my database.

View Replies !
Image Submit Button And Enter/return Key
I recently discovered that when using an image submit button, the button name was not passed as such, but the coordinates of the click on the image were appended to it. With this button:

<input type="image" src="images/go_round_white.gif" value="go!" name="searchparties_advanced">

the variables passes are searchparties_advanced.x and searchparties_advanced.y

PHP doesn't like periods in variable names so it converts them to underscores, so in my form process page I have: Code:

View Replies !
Reloading Page By Pressing Enter
I have always used a standard method to get my PHP sites to work and I am finding solving this one a bit of a mind bender. I would appreciate some help. It sounds simple but I am not getting any success.

I need to get a page to reload repeatedly on pressing enter. There is no user input form and the user will exit by clicking a link.

The page is a flash card type operation for a non-comercial site teaching people how to speak an endangered language. (It is has 20,000 people studying it a year according to the available statistics.) The idea is that the page creates a randomish but gramatically correct sentence which the user then repeats to themselves before pressing enter to get the next sentence.

View Replies !
Enter Text From Html Page In Php Form
I'm trying to do. What I have: listing.html:

<a href="apply.php">Click here to apply</a> Please mention job ID ###.

apply.php then has a form where the applicant can enter their contact info and the position they are interested in (text).

Can I use php to read the job ID which follows each apply link on listing.html, and then automatically enter it in the Position field on apply.php?

View Replies !
Make A Page Where My Users Can Enter A Person's Name
I am trying to make a page where my users can enter a person's name then, otpionally, upload a picture of them. And then write it all to the database and "deal" with the picture.

I allready have the working code for entering a name and storing it in my MySQL database, but I don't have a clue as how to deal with the "optional" picture upload and subsequent "dealing" with that file.

I would appreciate any sample code to upload the picture and storeing the reference along with the name that was entered.

View Replies !
LIMIT Results To LAST N Rows
I'm trying to retrieve the last 3 dates in a table. I should be able to SORT BY Date DESC LIMIT 3, then resort the array (using I forget which PHP function)right? But I thought there might be a slicker way to just do it in SQL. the equivalent of LIMIT 3 but off the end of the result set instead of the beginning. I suppose if I knew the number of records I could use that:

LIMIT [count-3], [count]

Hmm - maybe I should try my first subquery. Gotta check if my client's host is SQL 4.1+...

Maybe something like:

LIMIT ((SELECT COUNT(*) FROM Dates) -3), (SELECT COUNT(*) FROM Dates)

nope, that just blows up.

View Replies !
Echo Results Into Multiple Rows?
Ok so i got a client who wants something which i know will fall into noob territory for most of you young padawans however.

All i need to do is bring up results from a mysql database and then list the results into a table using a while loop, thats the easy bit and ive done that loads a times before, however this time rather than making a while loop that draws a table fills it then for the next database entry draws another table below it and echos the second entry into it, im buggering it up cos i need the second entry to fill the second column rather than draw a new table,
i need rows of 3 or 4 results then go to the next row

ID 1,2,3 got into column 1,2,3 then ID 4,5,6 go into the second row columns 1,2,3.

Feel like ive been noobed :D

Do i need an IF clause somewhere in the while or an extra variable for the counter or what? Doh!

This is what happens when your self taught and learn it one way always do it that way then get bedazzled by summat that should be so simple,

ideas would be appreciated :D

diegomh7 aka dildego

p.s thx to all for the dynamic page generation post :D

Heres how i need it to look more or less anyway, the next 3 entries from the database need to appear on a row below and so on...

View Replies !
Query Results And Affected Rows?
I'm doing a mass database update and I have a query string something like this:

UPDATE table SET field1=0, field2='' WHERE (email='address1' OR email='address2' {and so on...} );

I know you can view how many rows were changed after its done. I'm wondering though, is there a way I can view which entries failed? For example, lets say the email address - 'address34' was not found in the database, is there anyway I can display this from this UPDATE query? or to do this, would I have to compare each address individually with the table to check if it exists? (and if it matters I have about 1000 adresses that are being updated from this)

View Replies !
Inserting Search Results Into Rows
inquired on another forum about showing search results from mysql in rows, for example: the first 4 results on one row, the next four on the one after etc. etc. to a maximum of 16 before the user has to move on to the "next page to display any remaining results. i was given this code:

View Replies !
Table Results Columns Rows
I am having trouble implementing my coding to work with the desired results. I am calling up a total of ten thumbnail images to appear in a table. I would like these to be in two rows of five.

The code below will produce the thumnail images in a table, but all ten are in one row. How can I break this up so that after five images it will start a new row? Here is the code I am using now to show the thumbnails. Code:

View Replies !
Divide Mysql Results Into Rows In An Html Table
I need to divide my mySQL results into rows with 4 results on each row. Its for a small image gallery script, I wanna show 4 thumbnails per row. I have all the code ready to get the info and show it, I just need an example of how I can take the data from the table and have it automatically go to a new row every 4 entries.

View Replies !
Table, Mysql Results, Rows And Colums, Ideas?
I need to echo the reaults from a database onto a page, the results need to be displayed in rows and colums, ie 20 products in the database = 4 columns with 5 rows,

the hard part is the while loop to load the data in and dynamically gernerate a html table to put the data in, i want the page to look like this <product picture with price and desc underneath in a 3 wide layout - jatar_k> but i want it to be created dynamically from the database and im stuck on the while loop, something like this : Code:

View Replies !
Time Remaining
I've searched the forums for a solution to this problem but can't find one that matches my needs.

I'm wanting a time remaining counter to show when a item placed on a market ends (similar to ebay).

I've set when the item ends as a future timestamp, now i need to calculate how many days, hours and minutes are left until that time, i can't figure it out.

View Replies !
Days Remaining
I want to find out number of days remain from birthday(any other day).

View Replies !
Remaining Value For Select Option
i've used $_SERVER[PHP_SELF] , so my form and script are just one file .
when a user click the submit and have some errors the sript reload again ,
for a reloaded script i've put :(for exaple)

<input type="text" name="username" value=$_POST[username] />

so when it reload the last information the uer has typed won't be delete.it stays.

i want to do the same with my "select menu " , i don't know how , the select menu reset when script reload :(example)

gender :
<select>
<option value="">select one</option>
<option value="m">male</option>
<option value="f">female</option>
</select>

View Replies !
Number Of Days Remaining
Im wanting to let users view something for 3 months from the date of joining, after this time it will be disabled and they will have to upgrade to get access again. I have read the information in the manuals regarding TO_DAYS but still cant firgure it out:PHP Code:

SELECT m_usertype, TO_DAYS(DATE_ADD(m_joined, INTERVAL 3 MONTH))-TO_DAYS(NOW()) as days_left FROM members WHERE m_id = USERID

How do i correct this?

View Replies !
$_POSTs Remaining Empty?!
In writing to the flat file, only the ||||||s and the date function are being passed through. For some reason, the $_POSTs remain empty, or at least don't 'write'... I have tried different ways of building the $line variable but...nothing Code:

View Replies !
How To Display "No Results" Instead Of Empty Table On Results Page
I have a search facility on my homepage for a property lettings website. There are 3 search parametres, location, rent and type (e.g. 1bed). It passes the parametres to the results.php page and displays the results in a table.

When there are no results, it still displays a table, but it is empty. How do I display some text that says "No Results" instead of an empty table??

View Replies !
How To Cut Text And Display It Plus The Remaining Texts
just wanna ask if there's a way I can limit the text length i wanna display and display the remaining text below...??

let's say here's my string:

$CallNum = $rows['CallNum'];

this contains : Q179:1546:554-abc

now i want to display this text like this:

Q179:
1546:
554-
abc

View Replies !
Create A Dropdown Of Remaining Months
I am attempting to figure out how I can do the following:

Take a date from a MySQL database like: 2006-06-01 (June 1, 2006)
Then have a dropdown list of remaining months using for example todays date of 2005-08-23
This would product a dropdown like:

1 month
2 months
3 months
4 months
......
10 months

View Replies !
10 Pages Per Page, On Search Results Page.
how to limit the results to 10 pages per page. And for the result of the result to span over other pages numbers 1.2.3. etc. Does anyone have the code for this? Code:

View Replies !
Thumbnails In Rows Of 4 Across The Page
how I can position thumbnails in rows of 4 across the page? I've tried so many code combinations my head's swimming. Most of them produced a vertical display.

View Replies !
Get 4 Columns And 10 Rows To Appear On Each Page
I have a page that has 10 rows appear on it, but I also want 4 columns (not just 1). I was wondering if someone could tell me how I can go about and get 4 columns and 10 rows to appear on each page. Code:

View Replies !
Default Error Page If No Rows
If there are no rows in the result of my query, instead of just showing some text in the browser saying no rows found, could i redirect to a standard error page using this function?

View Replies !
Pagination :: Rows In Two Columns On One Page
I want to be able to paginate my rows in two columns on one page i.e.

Column 1 Column 2
row 0    row 5
row 1    row 6
row 2    row 7
row 3    row 8
row 4    row 9

<<Prev 12345 Next>>

This is the code I use. I found it and on Google, tweaked it and it works great.

<?php 


include 'dbmembers.php'; 

View Replies !
Image From Results
I've created a simple array (I think that is what it is called) in Dreamweaver. I know how to display images from the db with a static page but I can't seem to figure out how to do it when the pages are dynamic (i.e. display one record at at time). The below script puts the image name rather than the image itself. PHP Code:

<p>There are <?php echo $totalRows_Recordset1 ?> total records in this database. </p>
<p><?php echo $row_Recordset1['last']; ?></p>
<p><?php echo $row_Recordset1['Pictures']; ?></p>

View Replies !
Updating Multiple Rows With One .html Page
I am trying to create a form to update multiple entries in a mysql databse. This code below is rough, but it is working to the point wher it pulls the data, displays it in the text areas (but it does not go past the first white space in displaying, that needs to be fixed), and then I can alter the text fields, check a box, and hit submit, and it will update the fields, but the new value is size=20. I also can't update more than one record at a time, which defeats the purpose. Code:

View Replies !
Printing Number Of Rows Per Page To A Printer
Could anyone tell me how to go about the following - do I use css print style sheet or php.

I am using php and mysql to pull out and display records onto a webpage.  I have an option view all records that lists all records in the table.  I also have an option print all records.  However, my issue is when I go to print on some pages the information is split for example half the image on the bottom of the page and the other half on the top of the new page.

is there any techniques to force say 5 rows per page and then force a new page on the printer and print 5 more etc. 

I was going down the create pdf route but the file is large and user is left waiting for file to be generated.

View Replies !
How Do I Alter This Script To Show 5 Rows Per Page?
I'm very new to php/mysql and am having a few problems I would like to show five rows of data then have a link to next five / previous etc.

I've included the script I have below. I would like to add I have found articles on how to do this, but my problems is i don't knowwhere I should be editing the below code. I have tried several examples but just keep getting errors. Code:

View Replies !
Upload The Image Then Update A Page With The Image
Im trying to get PHP to upload the image then update a page with the image and the text inputted. I cant get the image upload to work. Code:

View Replies !
Dynamic Lists And Producing Rows On The Preceding Form Page
I have created the following dynamic drop down: Code:

View Replies !
Showing Image With Database Results
I am trying to retrieve data from a MySQL database and have got it working. Only thing is I would also like to display an image for each row. Each record has a file number and the images are all saved in an image folder and are named with the actual file number.

EG there is a record with file number 1111 and there is an image called 1111.gif in the images folder. I have included my code below. If someone can tell me how to include some html code to show the image in my php code. Code:

View Replies !
Poll - Results Outputted Into An Image
I'm staring a new project and i am trying to make an poll,which is fine, but what i need to do is have the results outputted into an image.

I havent been able to find anything like this on google so does anyone have any thoughts?

View Replies !
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:

View Replies !
10 Results Per Page?
I have many results I want just 20 per page, which I have, but when I click next or any other page number they don't load any other esults. Any ideas why please?

If I change $page I see the correct results, so if i change $page=3 then I see the results that I should on page 3. Any ideas how to get it workin with the links? Code:

View Replies !
Send Email - Page Where You Enter An Email Address And Click Send.
I am interested in creating an "email -this" type ability for a website. I am sure most people have seen an "email -this story" type link that is standard on most news web sites. You click such a link and then it takes you to a page where you enter an email address and click send. The link for the story and the title are not editable. Does anyone know where I can find example code of how to do this with php, and any explanation of how this works.

View Replies !
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?

View Replies !
How Do I Make The Results Appear On The Same Page?
Presently i am calling a new file to accept my dropdownlist values. Is it possible to make it such that the results will just appear on the same page? Code:

View Replies !
PING Results On PHP Web Page!
Can someone show me sample code on how can I write a script that shows ping results on a web page.

View Replies !
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).

View Replies !
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:

View Replies !
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")

View Replies !
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..

View Replies !
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";
?>

View Replies !
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:

View Replies !
Why Does My Page Always Show JUST First Set Of Results?
Whenever I execute a query I limit it to lets say 2 rows per page. The problem is my code will only say there is 1 page of results when there should be more! What am I doing wrong? Code:

View Replies !
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.

View Replies !
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.

View Replies !
Show 20 Results Per Page
i have created a database with some data in it and i want my page to read page and display the first 20 results and on the bottom to add numbers like [1] [2] [3] so the user can go to the next results.I figured that i can display the first 20 results by adding a counter on the while loop

$num_rows = mysql_num_rows($result);
$k=0;
         while (($k<=20)&&($row = mysql_fetch_row($result))){
$k+=1;
$i+=1;but i don't know how to display the numbers on the bottom.Here is my try
<?php for($j=1;$j<=($num_rows/20);$j+=1){
  echo "[".$j."]";
} ?> ...

View Replies !
Search Results Page
Say you have three pages, a search page, a results/master, and a detail page. You choose parameters on your search page and submit the page. The results show in the reults/master page. You click one to go the details page. You hit the browser button to go back and it shows the results/master page but shows "Page has expired" error. How can you prevent this? How can you show the results page whether you get there forwards or backwards?

View Replies !

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