Home     Articles & Projects     Products & Web Services

Forum

Tidying up urls for records spanning over multiple pages using Dreamweaver

Hi,

I am using Dreamweaver CS3 to develop a site where records span over multiple pages. I use .htaccess to tidy up the urls which works fine for the 1st page. However, using the built in functionality in DW to go to the next pages it goes back to the old ugly urls e.g.

http://www.site.com/country.php?pageNum_fpark=1&totalRows_fpark=568
&Country=england

The code that generates this is:

<td><?php if ($pageNum_fpark < $totalPages_fpark) { // Show if not last page ?>
<span class="content"><a href="<?php printf("%s?pageNum_fpark=%d%s", $currentPage, min($totalPages_fpark, $pageNum_fpark + 1), $queryString_fpark); ?>">Next</a>
<?php } // Show if not last page ?>

What i'd like it to do is display

www.http://www.site.com/england-2.html

I have worked out the .htaccess bit fine but just cant seem to get DW to display the page number only with out the other bits.

I would be very grateful for any pointers on this.

Thanks

Simon

cross server upload

Hi , i am trying to work out, how i allow users to upload an image, but store that image on another server.

Both are VPS servers.
thanks

How many time can 3992 letter and number be unique

So I am wanting to make a random session that can handle having a million plus users login in daily.
I wanted to create this because I am creating a social network for a client.

So I thought if I use 3992 letter and number this is what i am using 0123456789abcdefghijklmnopqrstuvwxyz-_

<?php
$length
= 3992;
           
$characters = "0123456789abcdefghijklmnopqrstuvwxyz-_";
           
$string = "session";   

            for (
$p = 0; $p < $length; $p++) {
               
$string .= $characters[mt_rand(0, strlen($characters))];
            }

       
$uid = $id;

       
$this->cookie_key = $string;
?>

pulling data from another database table if its there

Hi David,

I have a site which features holiday parks. The directory is shown at park level but we have some information for the accommodation available at some parks. I have an id on both tables to be able to match the accommodation to the park and would like to be able to include the details of the accommodation (only where there is a match) on the park detail page.

Here is where I have got to, but cant get it to work.

<?php
if ($row_ful_site['OwnerRef'] IS NOT NULL) {
  require(
"../extras/<?php echo htmlentities($row_ful_site['ParkRef']);?>
.html");
}
?>

When I deploy the code it kills the whole page.

I hope you can help.

Many thanks

Simon

Find if string has symbols

Hi I want to find if a user has placed a symbol or symbols in a input field.
If they have I want to show an error.
code $109

However I am not sure how I do it.

how to remove the following

I am developing a site which is quite CSS rich, and in the admin area, the user needs to be able to view the site view as they are not HTML coders.

So in the textarea I placed

<link rel="stylesheet" href="http://www.example.com/templates/css/style.css" type="text/css">

However I don't want it to save that in the mysql.
So how do I tell the server NOT to include it.
I tried preg_replace but that did not work

PHP - MySQL country, state and city

Hi I am having a small issue, I need to stop it showing state names that it already has printed out once

                         ID Name CountryCode District Population
130 Sydney AUS                 New South Wales 3276207
131 Melbourne AUS                 Victoria 2865329
132 Brisbane AUS                 Queensland 1291117
133 Perth AUS                         West Australia 1096829
134 Adelaide AUS                 South Australia 978100
135 Canberra AUS                 ACT 322723
136 Gold Coast AUS                 Queensland 311932
137 Newcastle AUS                New South Wales 270324
138 Central Coast AUS         New South Wales 227657
139 Wollongong AUS         New South Wales 219761
140 Hobart AUS                 Tasmania 126118
141 Geelong AUS                 Victoria 125382
142 Townsville AUS                 Queensland 109914
143 Cairns AUS                 Queensland 92273

as you can see from the above the district for some of the cities aka name are the same,
So I wondering if there is anyone to only show it once?

Thanks

Storing and running PHP code in MySQL

Hi All,
just wondering if anyone might be able to help me, I am storing the following code in a MYSQL table

<?php
if($_GET['success'] == 1)
{
print
"Hello";
}
?>

However when i print this on a page using

<?php
eval('?>
' . $stories[2]['html'] . '<?php ');
?>

and I go to http://www.example.com/?success=1

it does not run the PHP code.

mysql inner join

Hi I am trying to inner join 6 tables, however it seems to not load when I run the sql, in PHPMyAdmin
It does not give me any error code.

SELECT
t1.id as id,
t1.stationid as search_stationid,
t1.artist as search_artistid,
t1.album as search_albumid,
t1.song as search_song,
t2.id as artistid,
t2.name as artistname,
t3.id as artid,
t3.art as artHTML,
t4.id as albumid,
t4.artist_id as match_artistid,
t4.art as match_artid,
t5.id as songid,
t5.song_title as songtitle,
t5.artist_id as song_artistid,
t5.album_id as song_albumid,
t5.songtime as songtime,
t6.radio_station_name as station_name,
t6.radio_station_high_stream as high_stream,
t6.radio_station_logo as logo,
t6.radio_stream_type_high as stream,
t6.type_high as type,
t6.radio_station_homepage as link
FROM tbl_search as t1
INNER JOIN tbl_radio_station as t6
ON t6.radio_station_id = t1.id
INNER JOIN tbl_search_artist as t2
ON t2.id = t1.artist
INNER JOIN tbl_search_album as t4
ON t4.id = t1.album
INNER JOIN tbl_search_albumart as t3
ON t3.id = t4.id
INNER JOIN tbl_search_song as t5
ON t5.id = t1.song
WHERE id = 1

Join two mysql tables together to get one image

Hi I want to do the following.
I have a gallery table that says each gallery like
fruit
meat
veg

in another table I have all the fruit, veg and meat pictures.

What I want to do is when user clicks gallery it shows each gallery category but only one image from the category.

Syndicate content