Yes this should be in a .htaccess file by the way.

[code]
RewriteEngine On
RewriteRule ^chatpage.html chatpage.php [L]
[/code]

Will work on the document named chatpage.php and you can access it by the chatpage.html.

Just change the chatpage on both sides for whatever you document name is.

of course... :D

This is what this line is supposed to change it's supposed to make PHP parse the contents of the file...

Or use URL Rewriting.

.htaccess
[code]
RewriteEngine On
RewriteRule (.*).html $1.php [L]
[/code]

This will make the browser think the document is .html but instead the server looks for .php.

PUBLIC URL: [url]http://example.com/index.html[/url]
INTERNAL URL: DOCUMENT_ROOT/index.php

Hello All,

I'm not sure if this is the right place to put this, I apologise for it any way.

Okay so here it is, I have a sitemap file [icode]sitemap.xml[/icode] and I have PHP code inside it. The problem I am having is when adding the following lines:

[code]

AddHandler application/x-httpd-php .php .xml

or

AddHandler x-httpd-php .php .xml

[/code]

This forces the browser to download the files, this is not the desired outcome what should happen is apache tells PHP to parse the PHP code in the xml document and then display the results.

Please can someone help me with this.

I would advise wrapping all queries inside the mysql_real_escape_string() function.

It seems as though between PHP and MySql they are not comming up with the same result.

Okay what I would suggest doing is where you are echoing out the error message "file not found..." under that add the following line:
[icode]echo "
" . $_SERVER['DOCUMENT_ROOT'] . "/upload/" . $_POST['delete'];[/icode]

This should bring a new line displaying the internal file system path that the system is looking for.

Also the main thing that allowed me to do this is the second parenthasis of the toggle function.
[code=javascript]

toggle( 500 , function() { $("#current").animate( { "margin-left": "-842px" } , 1000 ); } );

[/code]

Okay, I solved the problem. The resolution is to get rid of moving the objects down butr instead hide them then when they come back in show them then animate the margin to 0.

There is no CSS for the #current div, the CSS provides the rules for each div and the wrapping #slider div. The JavaScript should handle the CSS therafter.

Hello Guys,

Right my problem is, I am creating a slider where in which each element is slid (using animate width) into place.

This is how it works, the element currently displayed is give a margin-left: of 842px (same as my slider width) and then a margin-top: of 300px (height of my slider) then it will snap the margin-left to -842px thus moving it to the other side then reset the top margin to put it inline with the slider.

This works fine whilst I have position absolute on but then you can see the overflow, this system works on the fact that whatever overflows the slider will be hidden. I tried floating them but however they all come in at once.

What is the answer to this question?

[b]JS[/b]
[code=javascript]

// JavaScript Document

jQuery.fn.log = function (msg) {
console.log("%s: %o", msg, this);
return this;
};
function beginSlide() {
setTimeout('slide()',10000);
}

function slide() {
var next = $("#current").next();
if( $(next).html() == null ) {
var next = $("#slider ul li:first").log("Flagged Issue");
}
$("#current").animate(
{ "margin-left": "842px" },
1000,
function() {
$(this).animate(
{"margin-top":"300px"},
1,
function() {
$(this).animate(
{"margin-left": "-842px"},
1,
function() {
$(this).animate(
{"margin-top": "0"},
1,
function() {
$(next).animate(
{ "margin-left":"0" },
1000
);
}
);
}
);
}
);
}
);

$(next).attr("id","tempCurrent");
$(".current").removeAttr("id");
$(".tempCurrent").attr("id","current");
setTimeout('slide()',10000);

}

$(document).ready(function() {
$("#current").animate( { "margin-left": "0" } , 1000 ).log("Displayed The First Element");
beginSlide();
})

[/code]

[b]HTML[/b]
[code=html]

Some Title 1

Some Text

Some Title 2

Some Text

Some Title 3

Some Text

...

To be fair, I'm a bloke and I'm quite liking the purple. It goes well with certain greens and looks elegant and tidy.

Doesn't mean it's girly. Thats just imature and some people need to grow up...

[QUOTE=cscgal;1221477]The backend code has not changed at all, except for the homepage and a couple of very small minor tweaks. Can you perhaps start a new thread outlining your problem and exactly what goes wrong, and I'll investigate it.[/QUOTE]

I will do, and sorry for the confusion but this is an ongoing issue, this is from the old design which I guess has now been carried over...

My main issues are in the actual back end programming. I have already lost an account as I can't reactivate it after having changed my email address.

I tried to contact the addresses it told me to but just got postmaster not received...

Hello all,
I have a problem. I have a dual boot system with XP as primary and Win7 installed off of XP so that XP has the boot files. My problem is now I want to get XP off and solely have Win7.

Can I remove the XP partition then boot using the Win7 disk to repair the Win7 partition and hopefully repair the boot files?

Thanks.

Yes but jQuery requires the browser to support the psuedo selector. Unfortunately IE doesn't support the nth-child or nth-of-type selector.

How else could I select the next and orevious element.

Okay now I understand the problem, the issue is I've used CSS3 psuedo elements. What can I use to select the div that is nth in the position without using psuedo selectors?

Thanks for the help so far, you've let me know about an imporatant fact I didn't otherwise know about.

;) Rep Added

Oh bollacks should have said it's on the services page:
[url]http://www.contemporary-applications.co.uk/services/[/url]

If you give me a moment I'll upload it for ya.

Hello again,

After my previous post I have tried to convert all my jQuery into JavaScript with success. UNTIL I looked at it in Internet Explorer and again it threw a wobly and is now having a go at my [icode]--.style.display='block'[/icode]'s. It says that it is not a function.

So please someone tell me how in the hell do you please internet explorer?

EVERY browser besides IE works fine so why oh why does IE do this?

Why don't microsoft take a leaf from Chrome, FF, Safari or Opera??? It makes no sense these are all very similar and display the desired results. However IE has to be fucking different and it has caused me a day of wasted work.

Please, please, please can someone help me with this I'm almost done with this now and I'm not far of quiting my career and working in sainsburys.

Thanks.

Hello all,

I am having some real issues with internet explorer.

I have created a jQuery image rotator (flick along a selection of images). Everything works on everything but internet explorer.

So much so that Internet Explorer doesn't even display the first image even before the transition. Instead I just get my arrows and an empty space.

The jQuery code is posted below allong with the HTML snippet:
[code=javascript]
// JavaScript Document

function logError(msg) {
$("#logger").append("

" + msg + "

");
}

function changeElement( element ) {
$("#service_selected").toggle()
$("#service_selected").removeAttr("id")

$(element).attr("id","service_selected");
$(element).toggle();
logError("Element changed");

}

function doChange( way ) {
if( way == "backward" ) {
if( $("#service_selected").attr("id") == $(".service_container:first").attr("id") ) {
var nextElement = $(".service_container:last")
} else {
var stopLoop = false
var elements = $(".service_container").size();
var passes = 0;
var count = elements;
while( stopLoop == false ) {
if( elements > 0 ) {
logError( elements + " elements exist, scanning one.")
}

            if( count < 1 ) {
                count = elements
                passes++
            }
            if( $("#service_selected").attr("id") == $(".service_container:nth-of-type(" + count + ")").attr("id") ) {
                if( count == 1 ) {
                    minus = elements
                } else {
                    minus = count - 1
                }
                logError("Testing element " + count )
                var nextElement = $(".service_container:nth-of-type(" + ( minus ) + ")")
                logError( "Element Changed, new element ID: " + minus )
                stopLoop = true
            } else {
                count--;
                logError("scan failed, testing element " + count + " next.")
            }
        }
        }

    changeElement( nextElement )
} else {
    if( $("#service_selected").attr("id") == $(".service_container:last").attr("id") ) ...

Yes it is...

It isn't practical to write up a bespoke script for every user so the PHP manual's GD section may bare some helpfull information.

This error means that the query returned 0 rows. This can either be due to the fact that there isn't any rows OR that the query its self is incorrect and not pulling the desired results.

To troubleshoot the query it's self I would take the query and put it in php myadmin obviously fill in the areas that would usually be filled with PHP variables.

Then run the query, if it still returns 0 then it may be that you have an error in the PHP variables or processes.

Not to contradict but Java is most likely the best in both functionality and usability.

JavaScript & AJAX are useless. The only decent methods are Java (not JavaScript) or Flash. This way you can let the user know that the image is either the wrong format or of a large size etc. BEFORE the user uploads it.

So you want the value to be sent along with the rest of the form?

This should work, although your better off adding a text value to the radio button to start off with so you can be sure the data is being sent.

You need to create a loop. If you are pulling the images from a database which I presume you are else the basis is pretty much the same.

[code=php]

<?php

// You need to connect to the database.
$pull_images = mysql_query("SELECT * FROM images ORDER BY upload_time ASC");

if( @mysql_num_rows( $pull_images ) > 0 ) {
echo '';
$count = 0;
while( $row = mysql_fetch_array( $pull_images ) ) {
if( $count == 0 ) {
echo "";
} else {
echo "";
}
echo '';
if( $count == 3 ) {
echo '';
$count = 0;
} else {
echo '';
$count++;
}
}

$cells_left = 4 - $count;
if( $cells_left > 0 ) {
$i = 0;
while( $i <= $cells_left ) {
echo '';
$i++;
}
echo '';
}
echo '';
} else {
echo "No images in the database.";
}

?>

[/code]

You need to use a concoction of the functions found here:
[url]http://php.net/manual/en/book.image.php[/url]

Generally what you need to do is create a document names usernames.php and then pass a get variable to this document containing the string you wish to be placed into it for instance [icode][/icode] then you will be able to render the image using the functions above to render them as an image.

Sorry do you want to restrict or resize the image?

If you are trying to create a social networking application you will need either a Java or Flash application to handle the file upload process as PHP is [b]very[/b] lacking in this aspect.

Reasons being is that PHP can only handle the file once it has been uploaded to the server. So if the size limit is 1mb and the user tries to upload a 1gb file they will have to wait and upload there file before PHP tells the user that the file is too large.