Parašė avice· 2010 Rugp. 12 14:08:19
#12
Dar 1 klausimelis.
Noriu sita koda:
foreach ($_POST as $secvalue) {
if ((eregi('<[^>]*script.*\'?[^>]*>', $secvalue)) ||
(eregi('<[^>]*object.*\'?[^>]*>', $secvalue)) ||
(eregi('<[^>]*iframe.*\'?[^>]*>', $secvalue)) ||
(eregi('<[^>]*applet.*\'?[^>]*>', $secvalue)) ||
(eregi('<[^>]*window.*\'?[^>]*>', $secvalue)) ||
(eregi('<[^>]*document.*\'?[^>]*>', $secvalue)) ||
(eregi('<[^>]*cookie.*\'?[^>]*>', $secvalue)) ||
(eregi('<[^>]*meta.*\'?[^>]*>', $secvalue)) ||
(eregi('<[^>]*style.*\'?[^>]*>', $secvalue)) ||
(eregi('<[^>]*alert.*\'?[^>]*>', $secvalue)) ||
(eregi('<[^>]*form.*\'?[^>]*>', $secvalue)) ||
(eregi('<[^>]*php.*\'?[^>]*>', $secvalue)) ||
(eregi('<[^>]*<?.*\'?[^>]*>', $secvalue)) ||
(eregi('<[^>]*img.*\'?[^>]*>', $secvalue))) {
die ('Naudoti HTML ar PHP Kodus <B>DRAUDZIAMA</B>.');
}
}
Pritaikit prie sito:
<?php
include "config.php";
$name = $_SESSION['username'];
$server = $_POST['server'];
$v = $_POST['v'];
$ipas = $_POST['ipas'];
$port = $_POST['port'];
$link = $_POST['link'];
$rate = $_POST['rate'];
mysql_query("UPDATE server SET server = '$server', v = '$v', ipas = '$ipas', port = '$port', link = '$link', rate = '$rate'
WHERE uname = '$name'");
echo 'Informacija Atnaujinta';
<?
bet niekas nesigauna reikia , kad pirma tikrintu ar nera
html ar
php kodu , jei yra mestu klaida , o jei nera irasytu gauta informacija i db.
Niekas man nesigauna :(