Kleine Vragen Topic #1

Gestart doorLennard4.284 reacties15.585 weergaven

4.285 berichten · pagina 218 van 286

Berichten
8.602
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Dylanh schreef:
In een yml bestand?

Kleine (Faal) vraag:
require_once(./../../configuration.php);


Config bestand staat in de root map. De database class staat in /Modules/Class/Database.Class.php

Waarom pakt ie de config bestand niet?

In /Modules/Database.php staat dit:
require_once(./../configuration.php);

dus dan zou je zeggen dat in de Class folder een /../ bij moet maar dit werkt niet?

Doe $_SERVER[DOCUMENT_ROOT] gebruiken voor je paths, niet ../../
0
Berichten
14.025
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien
Shahiem schreef:
Eerdere citaten tonen
Dylanh schreef:
Eerdere citaten tonen
Raaoul schreef:
Eerdere citaten tonen
Dylanh schreef:
Eerdere citaten tonen
Raaoul schreef:
Eerdere citaten tonen
Dylanh schreef:
Een frame-work is toch dat je met dat script meerde dingen kan maken? Dus je kan er een forum mee maken, je kan er ook een spelletjes site met inlog systeem mee maken???
Weet je wel hoe OO werkt?
Want de meesten noemen een framework een config.php bestandje met classes en variables zoals $db, $fouten en dan gewoon op iedere pagina je config.php includen. Zoals EERos een beetje. Helemaal fout.
Nee, ik weet niet eens wat OO is. Ik dacht toch iets met mappen lib, templates etc?

toevoeging op 1 januari 2013, 13:20:30:
Ik wil dus iets maken waar ik al mijn website op wil bouwen.
Jup. Een framework is een grote toolset van classes die je kunt gebruiken in je project.
Hoe mijn framework in elkaar zit;
Spoiler tonen
Zoiets wil ik dus ook maken, maar dan een stuk gemakkelijker dat ik het gewoon zelf snap.

Ik ga dus een eigen frame-work maken biggrin
toevoeging op 1 januari 2013, 13:25:31:
Wat zit er in application.yml als ik vragen mag?
Waarom ga je niet eerst werken met een bestaand framework voordat je er een zelf wilt maken.?
Omdat ik dan zelf weet hoe het werkt en omdat ik het wil proberen.

Bedankt.
Milan schreef:
Eerdere citaten tonen
Dylanh schreef:
In een yml bestand?
Kleine (Faal) vraag:

require_once(./../../configuration.php);


Config bestand staat in de root map. De database class staat in /Modules/Class/Database.Class.php

Waarom pakt ie de config bestand niet?

In /Modules/Database.php staat dit:
require_once(./../configuration.php);

dus dan zou je zeggen dat in de Class folder een /../ bij moet maar dit werkt niet?
Doe $_SERVER[DOCUMENT_ROOT] gebruiken voor je paths, niet ../../
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Milan schreef:
Eerdere citaten tonen
Dylanh schreef:
In een yml bestand?
Kleine (Faal) vraag:

require_once(./../../configuration.php);


Config bestand staat in de root map. De database class staat in /Modules/Class/Database.Class.php

Waarom pakt ie de config bestand niet?

In /Modules/Database.php staat dit:
require_once(./../configuration.php);

dus dan zou je zeggen dat in de Class folder een /../ bij moet maar dit werkt niet?
Doe $_SERVER[DOCUMENT_ROOT] gebruiken voor je paths, niet ../../

Maar je zet dingen als configs ook niet in je document root, maar BUITEN je document root zodat niemand er aan kan.
0
Berichten
14.025
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien
Waarom krijg ik nu
t
=

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/require_once"]require_once[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]./Modules/Get.php[/COLOR][COLOR= #007700]);[/COLOR]

[COLOR= #0000BB]$allow[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/array"]array[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]test[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/COLOR][COLOR= #007700]])) {[/COLOR]
     [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/file_exists"]file_exists[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]Templates/[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000].php[/COLOR][COLOR= #007700])) {[/COLOR]
        [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/in_array"]in_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]$allow[/COLOR][COLOR= #007700])) {[/COLOR]
            
            [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/COLOR][COLOR= #007700]] =[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000].php[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/COLOR][COLOR= #007700]]);[/COLOR]
            [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/COLOR][COLOR= #007700]] =[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000].html[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/COLOR][COLOR= #007700]]);[/COLOR]
        
            
         [COLOR= #0000BB]$more[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/explode"]explode[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]?[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REQUEST_URI[/COLOR][COLOR= #007700]]);[/COLOR]
         
            [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/count"]count[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$more[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]]) >=[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]) {[/COLOR]
                
            [URL="http://www.php.net/foreach"]foreach[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$more[/COLOR] [COLOR= #007700]as[/COLOR] [COLOR= #0000BB]$gets[/COLOR][COLOR= #007700]) {[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$gets[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]<br>[/COLOR][COLOR= #007700];
            }
                
            }[/COLOR] 
            
            [URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]Templates/[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000].php[/COLOR][COLOR= #007700]);
            
        }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]403[/COLOR][COLOR= #007700];
        }
    }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]404[/COLOR][COLOR= #007700];
    }
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
    [URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]Templates/index.php[/COLOR][COLOR= #007700]);
}[/COLOR]
?>


Ik wil voor elke GET de save functie laten doen. Ik ben nu eerst aan het testen. Ik probeer het nu zo te krijgen:

Stel als de URL zo is: http://localhost/test?a=Hoi&b=Alles

dan wil ik dit dus krijgen
a=Hoi
b=Alles

maar dat krijg ik niet, waarom niet? En hoe krijg je hoe ik het wil?
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
@ ^
Je weet toch dat $_GET en $_POST arrays zijn, dus dan is het toch simpel?

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

[URL="http://www.php.net/foreach"]foreach[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR] [COLOR= #007700]as[/COLOR] [COLOR= #0000BB]$key[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #0000BB]$value[/COLOR][COLOR= #007700])
{[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$key[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]=[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$value[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]<br>[/COLOR][COLOR= #007700];
}[/COLOR]

?>
0
Berichten
14.025
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien
Raaoul schreef:
@ ^
Je weet toch dat $_GET en $_POST arrays zijn, dus dan is het toch simpel?
[COLOR= #0000BB]<?php[/COLOR]

[URL="http://www.php.net/foreach"]foreach[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR] [COLOR= #007700]as[/COLOR] [COLOR= #0000BB]$key[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #0000BB]$value[/COLOR][COLOR= #007700])
{[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$key[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]=[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$value[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]<br>[/COLOR][COLOR= #007700];
}[/COLOR]

?>


Is $more.dan.ook een array @ mijn script?
0
Berichten
6.485
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Raaoul schreef:
@ ^
Je weet toch dat $_GET en $_POST arrays zijn, dus dan is het toch simpel?
[COLOR= #0000BB]<?php[/COLOR]

[URL="http://www.php.net/foreach"]foreach[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR] [COLOR= #007700]as[/COLOR] [COLOR= #0000BB]$key[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #0000BB]$value[/COLOR][COLOR= #007700])
{[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$key[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]=[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$value[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]<br>[/COLOR][COLOR= #007700];
}[/COLOR]

?>


Dit is niet heel netjes, want nu kan je dus als hackert eigen het waardes meegegeven.
0
Berichten
6.037
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Wat is hier fout aan? Ik krijg deze error: Parse error: syntax error, unexpected $end, ik hab al wat gegoogled, en aan het kijken geweest in mijn script maar ik vind het probleem niet? sadley
Spoiler tonen
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]config.php[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700](([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]])) || ([/COLOR][COLOR= #0000BB]$gegevens[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]rank[/COLOR][COLOR= #007700]] !=[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700])) {[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Je hebt geen toegang tot deze pagina!"[/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
    [COLOR= #0000BB]$aselectLink[/COLOR]    [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM uitbetaling WHERE id = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]aid[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$aselectLink[/COLOR][COLOR= #007700]) {[/COLOR]
        [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$selectLink[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]) {[/COLOR]
            [COLOR= #0000BB]$afetchLink[/COLOR]    [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$aselectLink[/COLOR][COLOR= #007700]);[/COLOR]
            [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$afetchLink[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]status[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]) {[/COLOR]
                
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Uitbetaling goedkeuren, even geduld!"[/COLOR][COLOR= #007700];[/COLOR]
                [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE uitbetaling SET status=2 WHERE id = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]aid[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<meta http-equiv="refresh" content="3;URL=uitbetaling.php" />[/COLOR][COLOR= #007700];
        }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
            
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Deze link is al afgekeurt"[/COLOR][COLOR= #007700];
            
        }
    }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
     [URL="http://www.php.net/echo"]echo[/URL] [URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]();
    }[/COLOR]    

    
    [COLOR= #0000BB]$selectLink[/COLOR]    [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM uitbetaling WHERE id = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$selectLink[/COLOR][COLOR= #007700]) {[/COLOR]
        [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$selectLink[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]) {[/COLOR]
            [COLOR= #0000BB]$fetchLink[/COLOR]    [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$selectLink[/COLOR][COLOR= #007700]);[/COLOR]
            [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$fetchLink[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]status[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]) {[/COLOR]
                
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Uitbetaling goedkeuren, even geduld!"[/COLOR][COLOR= #007700];[/COLOR]
                [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE uitbetaling SET status=1 WHERE id = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<meta http-equiv="refresh" content="3;URL=uitbetaling.php" />[/COLOR][COLOR= #007700];
        }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
            
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Deze link is al goedgekeurt"[/COLOR][COLOR= #007700];
            
        }
    }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
     [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"niks"[/COLOR][COLOR= #007700];
    }
     }[/COLOR]
    
    
    [COLOR= #0000BB]$UitbetaalQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM uitbetaling WHERE status= 0 ORDER by id DESC"[/COLOR][COLOR= #007700]);[/COLOR]
    
    [URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$uitbetaal[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_array"]mysql_fetch_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$UitbetaalQuery[/COLOR][COLOR= #007700]))
            {[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<input type="text" name="id" value="[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$uitbetaal[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" size="2" disabled/> [/COLOR][COLOR= #007700];[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<input type="text" name="gebruikersnaam" value="[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$uitbetaal[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" size="20" disabled/> [/COLOR][COLOR= #007700];[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<input type="text" name="credits" value="[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$uitbetaal[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]euro[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" size="5" disabled/> [/COLOR][COLOR= #007700];[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<input type="text" name="IP" value="[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$uitbetaal[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]IP[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" size="12" disabled/> [/COLOR][COLOR= #007700];[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<input type="text" name="datum" value="[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$uitbetaal[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]datum[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" size="15" disabled/> [/COLOR][COLOR= #007700];[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<input type="text" name="paypal" value="[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$uitbetaal[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]paypal[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" size="30" disabled/> [/COLOR][COLOR= #007700];[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000] <a href="/uitbetaling.php?id=[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$uitbetaal[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]">Goedkeuren</a> <a href="/uitbetaling.php?aid=[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$uitbetaal[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]">Afkeuren</a><br />[/COLOR][COLOR= #007700];
            } 
}[/COLOR]


?>
Alvast bedankt! smile (0,10 punten als beloning!)
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Tel je accolades eens. Er ontbreekt er eentje...

Je zou ook wat code tijdelijk kunnen isoleren door deze te commentariseren. Zo vindt je de fout makkelijker.
Tevens mist er fatsoenlijke foutafhandeling. Je staat nu zelf maar te bedenken dat een query gelukt kan zijn, en dat is not-done.

Ik zal eens even zoeken waar die accolade mist.

Edit
je sluit je if van lijn 8 niet af, denk ik smile
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Rogier schreef:
Eerdere citaten tonen
Raaoul schreef:
@ ^
Je weet toch dat $_GET en $_POST arrays zijn, dus dan is het toch simpel?

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

[URL="http://www.php.net/foreach"]foreach[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR] [COLOR= #007700]as[/COLOR] [COLOR= #0000BB]$key[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #0000BB]$value[/COLOR][COLOR= #007700])
{[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$key[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]=[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$value[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]<br>[/COLOR][COLOR= #007700];
}[/COLOR]

?>

Dit is niet heel netjes, want nu kan je dus als hackert eigen het waardes meegegeven.

Dat weet ik ook wel, maar ik weet niet wat hij precies wilt doen.
0
Berichten
5.952
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Bestaat er ook een gratis ledensysteem met punten?
0
Jvdw

Lid

Berichten
4.321
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
wie kan hier aangeven dat de cookie moet blijven voor een week?

<script type="text/javascript">
function setCookie(value)
{
document.cookie="cookie="+value;
}
</script>
0
Berichten
1.284
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Jvdw schreef:
wie kan hier aangeven dat de cookie moet blijven voor een week?

<script type="text/javascript">
function setCookie(value)
{
document.cookie="cookie="+value;
}
</script>
setcookie ("user", "", time()-604800);
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Raalphh schreef:
Bestaat er ook een gratis ledensysteem met punten?

Is eenvoudig in te bouwen, lijkt me. Elk puntensysteem werkt weer anders.
toevoeging op 2 januari 2013, 00:02:52:
Mounssif schreef:
Eerdere citaten tonen
Jvdw schreef:
wie kan hier aangeven dat de cookie moet blijven voor een week?
<script type="text/javascript">
function setCookie(value)
{
document.cookie="cookie="+value;
}
</script>

setcookie ("user", "", time()-604800);

JS !== PHP

function setCookie(c_name,value,exdays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate() + exdays);
var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
document.cookie=c_name + "=" + c_value;
}


Je kan dan bij exdays in je uiteindelijke aanroep dus 7 invullen.
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