PHP ver gevorderde |
|
Als ik een SWF uitvoer met een gastenboek (verwerking via een PHP pagina naar een MySQL db) vanaf mijn desktop dan worden de gegevens netjes in de DB gestoken. Upload ik diezelfde SWF naar een online locatie, dan werkt het niet meer. Weet soms iemand waar het aan kan liggen?
Hier de AS code:
function loadEntries(act, increment) {
// Define NumLow as a Number
num = new Number(_parent.NumLow);
// Act accordingly
if(act == "Next") {
// Add increment
_parent.NumLow = num + increment;
} else if(act == "Previous") {
_parent.NumLow = num - increment;
} else {
// Load default - i.e. 0
_parent.NumLow = 0;
}
// Update Statistics
_parent.read.low.text = _parent.NumLow;
_parent.read.high.text = Number(_parent.NumLow) + 10;
// Show Please wait text
_parent.read.entries.text = "Nieuwsposts inladen... ";
// Begin Loading
myEntries = new LoadVars()
myEntries.ref = this
myEntries.load("http://mrtn.1l.com/notdefined/GuestBook.php?action=read&r="+random(999)+"&NumLow="+_parent.NumLow)
myEntries.onLoad = function(success){
if(success){
// Assign output to components and objects
entries.text = this.entries;
totalEntries.text = this.totalEntries;
//Update values to calculate prev/next button visibility
num = Number(_parent.NumLow)
var totalEntries = Number(this.totalEntries);
var total = num+increment
//Hide/show next button
if(total<totalEntries) this.ref.next_button._visible = true;
else this.ref.next_button._visible = false
//Hide/show previous button
if(num==0) prev_button._visible = false; else prev_button._visible = true
}
}
}
// Load Default
_parent.read.loadEntries("Default", 10);
stop();
function loadEntries(act, increment) { // Define NumLow as a Number num = new Number(_parent.NumLow); // Act accordingly if(act == "Next") { // Add increment _parent.NumLow = num + increment; } else if(act == "Previous") { _parent.NumLow = num - increment; } else { // Load default - i.e. 0 _parent.NumLow = 0; } // Update Statistics _parent.read.low.text = _parent.NumLow; _parent.read.high.text = Number(_parent.NumLow) + 10; // Show Please wait text _parent.read.entries.text = "Nieuwsposts inladen... "; // Begin Loading myEntries = new LoadVars() myEntries.ref = this myEntries.load("http://mrtn.1l.com/notdefined/GuestBook.php?action=read&r="+random(999)+"&NumLow="+_parent.NumLow) myEntries.onLoad = function(success){ if(success){ // Assign output to components and objects entries.text = this.entries; totalEntries.text = this.totalEntries; //Update values to calculate prev/next button visibility num = Number(_parent.NumLow) var totalEntries = Number(this.totalEntries); var total = num+increment //Hide/show next button if(total<totalEntries) this.ref.next_button._visible = true; else this.ref.next_button._visible = false //Hide/show previous button if(num==0) prev_button._visible = false; else prev_button._visible = true } } } // Load Default _parent.read.loadEntries("Default", 10); stop();
|