i have a prob in a code of ch data

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

forgun
New php-forum User
New php-forum User
Posts: 5
Joined: Sun Oct 19, 2003 6:03 am
Contact:

i have a prob in a code of ch data

Postby forgun » Sat Nov 22, 2003 11:01 pm

the code

Code: Select all

<?
error_reporting (E_ALL ^ E_NOTICE);
include("./include/functions.phps");
if ($update) {
     if (empty($d) && empty($m) && empty($y)) {
          sqlcon();
          $sql = "UPDATE ipban SET  start = CURDATE() , tmp = $type  , end = NULL WHERE id = $id LIMIT 1" ;
          @mysql_query($sql);
         
     }
     else {
          $date = "$d.$m.$y";
          echo $date;
          sqlcon();
          $ip = decode_ip($ip);
          $sql = "UPDATE ipban SET ip= $ip , start = CURDATE() , tmp = $type  , end = $date WHERE id = $id LIMIT 1" ;
          @mysql_query($sql);
     }
}
?>         

the html doc

Code: Select all

<html>
<head>
<title>UpDate User/Ip Ban settings</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1255">
<link href="center.css" rel="stylesheet" type="text/css">
</head>
<body>
<form action="<?=$_SERVER['PHP_SELF'] ?>" method="post" name="settings">
<div align="center"><table width="100%"  border="1">
  <tr class="navLink">
    <td colspan="2"><div align="center">Ip Ban Settings</div></td>
    </tr>
  <tr class="formtxt">
    <td height="28"><div align="left">Type ban: </div></td>
    <td><?
    if ($t =='T') {
         echo '
<label>
      <input name="type" type="radio" value="t" checked>
      Temp
      <input name="type" type="radio" value="f">
      Forever</label>';
    }
    else {
         echo '
<label>
      <input name="type" type="radio" value="t">
      Temp
      <input name="type" type="radio" value="f" checked>
      Forever</label>';
    }
?>
</td>
  </tr>
  <tr class="formtxt">
    <td height="28"><div align="left">End(if type is t):</div></td>
    <td>
    <?
    if ($e == 'N/A') {
         echo "
    D
          <input name=\"d\" type=\"text\" class=\"msg_news\" size=\"2\" maxlength=\"2\">
    M
    <input name=\"m\" type=\"text\" class=\"msg_news\" size=\"2\" maxlength=\"2\">
    Y
    <input name=\"y\" type=\"text\" class=\"msg_news\" size=\"2\" maxlength=\"4\">";
    }
    if ($e !='N/A') {
         list ($d,$m,$y)  = explode('.',$e);
         echo "
    D
          <input name=\"d\" type=\"text\" class=\"msg_news\" value=\"$d\" size=\"2\" maxlength=\"2\">
    M
    <input name=\"m\" type=\"text\" class=\"msg_news\" value=\"$m\"  size=\"2\" maxlength=\"2\">
    Y
    <input name=\"y\" type=\"text\" class=\"msg_news\" value=\"$y\"  size=\"2\" maxlength=\"4\">$err[1]";
    }
    ?>
         </td>
  </tr>
  <tr class="navLink">
    <td colspan="2"><div align="center">
      <label>
      <input name="update" type="submit" class="textbox" id="update" value="Update Data">
      </label>
    </div></td>
  </tr>
  <tr class="navLink">
    <td colspan="2"><div align="center">End Settings </div></td>
  </tr>
</table>
</div>
</form>

why isnt working plz help me its not chancg the data why?

User avatar
Redcircle
Moderator
Moderator
Posts: 830
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA
Contact:

Postby Redcircle » Mon Nov 24, 2003 9:19 am

Please post your error code if any.

forgun
New php-forum User
New php-forum User
Posts: 5
Joined: Sun Oct 19, 2003 6:03 am
Contact:

Postby forgun » Tue Nov 25, 2003 5:50 am

i fix that:)


Return to “PHP coding => General”

Who is online

Users browsing this forum: No registered users and 2 guests