Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [php]info dla zielongego, pomoc
XubeiX
post
Post #1





Grupa: Zarejestrowani
Postów: 1
Pomógł: 0
Dołączył: 8.01.2010

Ostrzeżenie: (0%)
-----


Jestem w tym totalnie zielony ale próbuje swoich sił a mianowicie kolega przysłał mi skrypt który działa a ja chciał bym wprowadzić modyfikacje aby po kliknięciu na "Confirm" zaszły wszystkie zmiany w bazie danych + przekierowało mnie na inną stronę. Proszę pomóżcie mi oto cały kod.
  1. <?php
  2.  
  3. iseedeadpeople();
  4. switch (1) {
  5. default:
  6. if (@$_POST['submit']) {
  7.  
  8. if ($_POST['uacc']) {
  9. $query = mssql_query("select [memb___id] from [memb_info] where [memb___id]='".$_POST['uacc']."'");
  10. if (mssql_num_rows($query)<1)
  11. $notice = 'Warning: Account does not exist. Credits added anyway!!<br>';
  12. else $notice = '';
  13. $query = mssql_query("exec XCredits '".$_POST['uacc']."', '".$_POST['ucr']."';");
  14. $result = mssql_fetch_array($query);
  15.  
  16. print '<fieldset style="width: 330px;background-color: #DDDDDD;text-align:center;">'.$notice.highlight_string(htmlspecialchars($_POST['uacc']).'\'s current credit balance is '.number_format($result['QueryResult']), true).'</fieldset>';
  17.  
  18.  
  19.  
  20. } else print 'Please input an account name';
  21.  
  22. }
  23. if (@$_GET['user'])
  24. $_POST['uacc']=$_GET['user'];
  25.  
  26. print '<br><fieldset style="width: 330px;background-color: #DDDDDD;border: 1px solid #000000; font-family: arial; font-size: 12px;"><legend class="mu_style2" style="padding: 3px;font-weight:bold;background-color: #DDDDDD;border: 1px solid #000000;border-bottom:0px;">WebShop Credit adder (25 crd)</legend>
  27. <form method="post" action="">
  28. <table width=100% border=0>
  29. <tr>
  30. <td>Account</td><td> <input type="text" value="'.@htmlspecialchars($_POST['uacc']).'" maxlength="10" size="10" id="uacc" name="uacc"> </td></tr>
  31. <tr><td style="border-bottom: 1px solid #ccc;padding-bottom:4px;padding-left: 0px;">
  32. Credits add</td><td style="border-bottom: 1px solid #ccc;padding-bottom:4px;padding-right:0px;"> <input type="radio" size="1" style="text-align: center;" name="ucr" id="ucr" value="25">25</td>
  33. <tr><td colspan=2 style="text-align: right">
  34. <input type="submit" id="submit" name="submit" value="Confirm">
  35. </td></tr></table>
  36. </form>
  37. </fieldset>';
  38. }
  39. ?>

Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 2)
deirathe
post
Post #2





Grupa: Zarejestrowani
Postów: 426
Pomógł: 32
Dołączył: 24.05.2007

Ostrzeżenie: (0%)
-----


  1. #
  2. switch (1) {
  3. #
  4. default:

czlowieku mozesz mi powiedziec co wg Ciebei to robi
?
Go to the top of the page
+Quote Post
erix
post
Post #3





Grupa: Moderatorzy
Postów: 15 467
Pomógł: 1451
Dołączył: 25.04.2005
Skąd: Szczebrzeszyn/Rzeszów




Przy okazji popraw tytuł wątku na lepiej opisujący problem.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.08.2025 - 21:51