Puika1 Posted November 15, 2009 Report Share Posted November 15, 2009 man vaidziga neliela palidziba ar skriptu if($_POST){ $code=mysql_escape_string($_POST['code']); $valid=check_valid_code($code); if($valid){ print("Paldies! Price: ".$valid); // kods derigs , atgriez price } else { print("Nepareizs kods"); // nepareiz kods } } print("<form action='' method='post'>"); print("<input type='text' size='6' maxlength='8' name='code' value=''>"); print("<input type='submit' name='check_code' value='Buy'>"); print("</form>"); ?> sita ir vieta ja kods ir derigs parada sho te print("Paldies! Price: ".$valid); // kods derigs , atgriez price ka es varu izdarit lai paldies vieta kad kods ir parezi ievadits paradas auto download links ka uzpiezot kosu uzreiz lejupladejas fails? Quote Link to comment Share on other sites More sharing options...
rATRIJS Posted November 15, 2009 Report Share Posted November 15, 2009 (edited) if($valid) { $path; //ceļš uz lejupielādējamo failu echo '<a href="$path">Dōvnlōd</a>'; } ? Edited November 15, 2009 by rATRIJS Quote Link to comment Share on other sites More sharing options...
Puika1 Posted November 15, 2009 Author Report Share Posted November 15, 2009 (edited) kautkas nestrada "Parse error: syntax error, unexpected ':' in C:\AppServ\www\shop\index.php on line 26" if($valid){ $path;http://manalapa.lv/web.zip //celš uz lejupieladejamo failu echo '<a href="$path">download</a>'; } ja butu labak ja automatiski lejupladetos Edited November 15, 2009 by Puika1 Quote Link to comment Share on other sites More sharing options...
false Posted November 15, 2009 Report Share Posted November 15, 2009 ratrij viņš grib lai automatiski lējuplādetos.. laikam.. Quote Link to comment Share on other sites More sharing options...
xmas12 Posted November 15, 2009 Report Share Posted November 15, 2009 kautkas nestrada "Parse error: syntax error, unexpected ':' in C:\AppServ\www\shop\index.php on line 26" if($valid){ $path;http://manalapa.lv/web.zip //celš uz lejupieladejamo failu echo '<a href="$path">download</a>'; } ja butu labak ja automatiski lejupladetos kāpeč šajā vietā liec to adresi ? $path;http://manalapa.lv/web.zip //celš uz lejupieladejamo failu vnk $path vietaa liec $tavaadreseuzdownload Vai ja gribi lai palidzu tad raksti man PM! Quote Link to comment Share on other sites More sharing options...
rATRIJS Posted November 15, 2009 Report Share Posted November 15, 2009 Puika1 es domāju, ka tev ir bezcerīgi kaut ko uztaisīt ja var pieļaut tādu kļūdu. Ja gribi automātiski, tad: header("Location: $path"); Bet tas, protams, ir nedroši, jo kad viens uzzinās ceļu uz tavu failu, tad pārējiem vien atliks ievadīt to adresi un viņi varēs dabūtu tavu failu tāpat vien nemaksājot. Quote Link to comment Share on other sites More sharing options...
false Posted November 15, 2009 Report Share Posted November 15, 2009 (edited) Man ir drošaka lējuplādešana, uzraksti skaipā, tu taču zini mani ;) Edited November 15, 2009 by false Quote Link to comment Share on other sites More sharing options...
xmas12 Posted November 15, 2009 Report Share Posted November 15, 2009 Man ir drošaka lējuplādešana, uzraksti skaipā, tu taču zini mani ;) Kas tad tev drošāks ir? :D Quote Link to comment Share on other sites More sharing options...
Puika1 Posted November 15, 2009 Author Report Share Posted November 15, 2009 ar viena cilveka palidzibu tiku tik talu foreach($config['prices'] as $i => $val){ $result = join('', file("http://sms.solarf.lv/confirm.php?id=".$config[id]."&price=".$val."&code=$code")); if($result=='key_ok'){ return $val; } } } if($_POST){ $code=mysql_escape_string($_POST['code']); $valid=check_valid_code($code); $path = "http://download74.mediafire.com/1jgycfgpvhhg/zgnkoy3oatn/Demon's+Souls+theme.zip"; if($valid){ print("Kods derigs / Price: ".$valid); // kods derigs , atgriez price header("Location: $path"); } else { print("Nepareizs kods"); // nepareiz kods } } print("<form action='' method='post'>"); print("<input type='text' size='6' maxlength='8' name='code' value=''>"); print("<input type='submit' name='check_code' value='Buy'>"); print("</form>"); ?> bet kad ievadu kodu uzspiezu ok man parada Kods derigs / Price: slr15Warning: Cannot modify header information - headers already sent by (output started at C:\AppServ\www\shop\index.php:28) in C:\AppServ\www\shop\index.php on line 30 kas varetu but par problemu Quote Link to comment Share on other sites More sharing options...
rATRIJS Posted November 15, 2009 Report Share Posted November 15, 2009 http://php.lv/f/topic/7294-headers-already-sent/ Quote Link to comment Share on other sites More sharing options...
waplet Posted November 15, 2009 Report Share Posted November 15, 2009 print("Kods derigs / Price: ".$valid); // kods derigs , atgriez price izņemt Quote Link to comment Share on other sites More sharing options...
Puika1 Posted November 15, 2009 Author Report Share Posted November 15, 2009 paldies viss starada :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.