PHP help me

Gestart doorJesper177 reacties875 weergaven

178 berichten · pagina 8 van 12

Berichten
15.446
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
zoals het er staat, onverwacht einde. Dus je moet even kijken of je ergens een } ben vergeten.
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hmpfff... Neem notepad++ erbij en check waar je } mist.
0
Jesper

Lid · Topicstarter

Berichten
3.532
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Vriendje schreef:
Hmpfff... Neem notepad++ erbij en check waar je } mist.
Deed ik al maar ik heb de oude terug gezet en het blijft nog steeds

toevoeging op 28 januari 2012, 15:01:42:
Die in de zip zit als je het download die heb ik terug gezet alleen hij doet het dan nog niet zelfde error
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Heb je chatstuff.php teruggezet?
0
Jesper

Lid · Topicstarter

Berichten
3.532
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ja chatstuff
0
Berichten
3.074
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Aarclay schreef:
Ik vraag me af of het niet beter is dat de TS er beter aan doet om dit in de ijskast te schuiven, en te beginnen met een Hello World oefening.
[COLOR= #0000BB]<?php[/COLOR] 
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Dat is niet zo aardig om te zeggen..[/COLOR][COLOR= #007700];[/COLOR]
?>


Maar even on-topic, wat is er precies fout aan chatstuff.php?
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Jespar schreef:
Ja chatstuff
Dan is daar ook iets fout?
0
Jesper

Lid · Topicstarter

Berichten
3.532
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Quote:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/uploaden/domains/manxi.nl/public_html/pages/admin.php on line 96

[COLOR= #0000BB]<?php[/COLOR]

        [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO overzicht (linkpartnernaam, linkpartnerurl) VALUES ( . $_POST[linkpartnernaam] . ,  . $_POST[linkpartnerurl] . )"[/COLOR][COLOR= #007700]);[/COLOR] 


?>
0
Berichten
1.000
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php[/COLOR]

        [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO overzicht (linkpartnernaam, linkpartnerurl) VALUES ( . $_POST[linkpartnernaam] . ,  . $_POST[linkpartnerurl] . )"[/COLOR][COLOR= #007700]);[/COLOR] 


?>


dat?
0
Jesper

Lid · Topicstarter

Berichten
3.532
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
nop. zelfde error
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Onderscheid je PHP en SQL nou eens. In SQL moeten bij fields GEEN haakjes. Bij PHP moeten er WEL (in echo). Bij invoer SQL moeten er WEL haakjes ()!!

Hoezo vinden wij dit meteen, en jij niet? Hier zaten 4tal fouten in!

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO overzicht (linkpartnernaam, linkpartnerurl) VALUES ("[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]linkpartnernaam[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]", "[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]linkpartnerurl[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]")"[/COLOR][COLOR= #007700]);[/COLOR] 
?>


Niet vergeten te beveiligen tegen SQL injectie, en checken of er wel invoer is, en checken of url geldig is (d.m.v. WHOIS)
0
Jesper

Lid · Topicstarter

Berichten
3.532
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
/* COPYRIGHT WHEAR */

function aboveBoxEffect(){
/*
$(#aboveBox).slideDown(fast, function(){
$(#items).fadeIn(fast);
});
*/
}

function pageSize(what){
    oldHeight = parseInt(document.getElementById(items).style.height);
    if(what == bigger) newHeight = oldHeight + 100;
    if(what == smaller) newHeight = oldHeight - 100;
    document.getElementById(items).style.height = newHeight + px;
}

function delete_item(id){

var c = confirm(Weet je het zeker?);

if(c == true){
 $(#item + id).fadeOut(fast);
$.get(editor_delete.php?id= + id, function(data){
  
 });

}
 
}

function z_index(id, index){

$(#item + id).css(z-index, index);

$.get(editor_zindex.php?id= + id + &index= + index, function(data){

});

}

function setup() {
              //<![CDATA[

                // This call can be placed at any point after the
                // <textarea>, or inside a <head><script> in a
                // window.onload event handler.

                // Replace the <textarea id="editor"> with an CKEditor
                // instance, using default configurations.
                CKEDITOR.replaceAll();

            //]]>

}

function leavingpage(redirect_url){

var c = confirm(Weet je zeker dat je deze pagina wilt verlaten?nJe wijzigingen zullen niet opgeslagen zijn!);

if(c == true){

location.href = redirect_url;

}

}

function add_item(id, content, width, height, border_color, border_width, border_style, background){

var style = width:  + width + px; height:  + height + px; border:  + border_width + px  + border_style +  # + border_color + ; background: # + background + ;;

document.getElementById(items).innerHTML = document.getElementById(items).innerHTML + <div id="item + id + " style="z-index: 0; position: absolute; top: 100px; left: 100px;" onmousedown="dragstart(this, event, +id+);"><img src="img/move.gif" /> <a href="#" onclick="lightbox(editor_edittxt.php?id= + id + );"><img src="img/edit.gif" /></a> <a onclick="delete_item(+id+);" href="#"><img src="img/delete.gif" /></a> <a href="#" onclick="z_index( + id + , 2);"><img src="img/shape_square_add.png"></a> <a href="#" onclick="z_index( + id + , 1);"><img src="img/shape_square_delete.png"></a><br /><div id="item_content" style=" + style + "> + content + </div><input type="hidden" name="left[ + id + ]" id="left[+id+]" value="100" /><input type="hidden" name="top[ + id + ]" id="top[+id+]" value="100" /></div>;

}

function edit_item(id, newcontent){

document.getElementById(item_content + id).innerHTML = newcontent;

}


Wat is hier fout aan?

In internet explorerer opent hij de editor niet als je hem wil editen en verwijderen lukt ook niet
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Jespar schreef:
/* COPYRIGHT WHEAR */

function aboveBoxEffect(){
/*
$(#aboveBox).slideDown(fast, function(){
$(#items).fadeIn(fast);
});
*/
}

function pageSize(what){
    oldHeight = parseInt(document.getElementById(items).style.height);
    if(what == bigger) newHeight = oldHeight + 100;
    if(what == smaller) newHeight = oldHeight - 100;
    document.getElementById(items).style.height = newHeight + px;
}

function delete_item(id){

var c = confirm(Weet je het zeker?);

if(c == true){
 $(#item + id).fadeOut(fast);
$.get(editor_delete.php?id= + id, function(data){
  
 });

}
 
}

function z_index(id, index){

$(#item + id).css(z-index, index);

$.get(editor_zindex.php?id= + id + &index= + index, function(data){

});

}

function setup() {
              //<![CDATA[

                // This call can be placed at any point after the
                // <textarea>, or inside a <head><script> in a
                // window.onload event handler.

                // Replace the <textarea id="editor"> with an CKEditor
                // instance, using default configurations.
                CKEDITOR.replaceAll();

            //]]>

}

function leavingpage(redirect_url){

var c = confirm(Weet je zeker dat je deze pagina wilt verlaten?nJe wijzigingen zullen niet opgeslagen zijn!);

if(c == true){

location.href = redirect_url;

}

}

function add_item(id, content, width, height, border_color, border_width, border_style, background){

var style = width:  + width + px; height:  + height + px; border:  + border_width + px  + border_style +  # + border_color + ; background: # + background + ;;

document.getElementById(items).innerHTML = document.getElementById(items).innerHTML + <div id="item + id + " style="z-index: 0; position: absolute; top: 100px; left: 100px;" onmousedown="dragstart(this, event, +id+);"><img src="img/move.gif" /> <a href="#" onclick="lightbox(editor_edittxt.php?id= + id + );"><img src="img/edit.gif" /></a> <a onclick="delete_item(+id+);" href="#"><img src="img/delete.gif" /></a> <a href="#" onclick="z_index( + id + , 2);"><img src="img/shape_square_add.png"></a> <a href="#" onclick="z_index( + id + , 1);"><img src="img/shape_square_delete.png"></a><br /><div id="item_content" style=" + style + "> + content + </div><input type="hidden" name="left[ + id + ]" id="left[+id+]" value="100" /><input type="hidden" name="top[ + id + ]" id="top[+id+]" value="100" /></div>;

}

function edit_item(id, newcontent){

document.getElementById(item_content + id).innerHTML = newcontent;

}
Wat is hier fout aan?

In internet explorerer opent hij de editor niet als je hem wil editen en verwijderen lukt ook niet

Als hij de editor niet opent dan werkt de lightbox niet. Dan ligt het dus niet hier aan. Dit is voor het wijzigen en toevoegen van tekstvakken enz..
0
Jesper

Lid · Topicstarter

Berichten
3.532
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
/* COPYRIGHT WHEAR */

function lightbox(url){

    $(#lightBoxContent).html(<center><img src="img/loader.gif" /></center>);
   $(#lightBox).fadeIn(fast, function(){
   $(#lightBoxContent).fadeIn(slow);
   });

$.get(url, function(data){


   $(#lightBoxContent).html(<span style="float: right;"><a onclick="lightbox_close();" href="#"><img src="img/delete.gif" /></a></span> + data);
   setup();
 });

}

function lightbox_close(){
             if (CKEDITOR.instances.text)
             {
                
                var oEditor = CKEDITOR.instances.text;
                 oEditor.destroy();
                   oEditor = null;
               
               }

$(#lightBoxContent).fadeOut(fast);
    $(#lightBox).fadeOut(fast);


    }


Dit is lightbox.js
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Staat die wel in de meta van je editor.php?
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren