Jump to content

kraadde

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

kraadde's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks lemmin. I learned again something from you guys! kraadde
  2. In my prog I have a socket connection like below. $fp = fsockopen("$host", $port, $errno, $errstr, 30); if (!$fp) {....... everything works perfectly. However, today I opened the site while the host was down. The website returned an error message (...fsocket connection could not open...error on line...). This is very annoying since the error message shows information about the source page and code.. BTW, error_reporting(E_ALL) is NOT included in my code. Any hint how I can avoid that kind of error message? kraadde
  3. I coded a page which I want to be reloaded periodically. I used the following line in the header: <meta http-equiv="refresh" content="60; URL=http://....../"> It all works. The problem is, that the page contains a form that is being filled by the user. I want to pause (or stop) the reloading while the form is being filled, in order to avoid the page to reload while the form has not been sent out. Is there any possibility to do so without using Javascripts? This is not an option, because some users may have Java execution deisabled.. Many thanks for your all help kraadde
  4. I have following code: function chk( & $var ){ if ( !isset($var) ){ return NULL; }else{ return $var; } } chk($loop); ..... chk($y); $y = 0; while (($loop[$y]) != ''){ error here ?????????? ........ $y++; } ...... Does anybody know how to fix this? I can not figure out why there should be an undefined offset . HELP ME PLEASE! kraadde
  5. I have a MySQL DB on my HD that I want to modify with PHP (like delete some tables and delete some fields) but I do not want to upload it to my server and I also do not want to start XAMPP. Does anybody have a good hint how to do that? Thnaks all for a good advise
  6. what I wanna to achieve is to have a set of database records listed in a table with a column with checkboxes. the user should be able to tick some checkboxes and by pushing a bitton, delete the corresponding records in the database and in the displayed table. I tried some coding and below is what I did. however there are always error messages like: Undefined index: ...and implode() [function.implode]: Bad arguments. I tried alsmost everything, but I need fresh eyes to look at it...Any help from you guys please... What I am doing wrong or is ther any better way to achieve what i want? anyone knows a script of some sort? Many thanks kraadde@yahoo.com [code] <?php error_reporting(E_ALL); // dB Initiali include("connect.inc.php"); // ms into min, sec include ("msTominsec_Umw.php"); mysql_connect(DB_HOST,DB_USER,DB_PASS) or die(mysql_error()); mysql_select_db(DB_Login) or die(mysql_error()); ?> <table border="0" width="98%"rules="rows" >   <tr> <td width="5%">#</td> ....more table code..... <td width="5%"></td>     </tr> </table> <div style="width:98%; height:400px; overflow:auto; border:0px solid #840; margin:1em;">   <?php echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="POST">';  $res_wunsch = mysql_query("SELECT * FROM xxxx order by in_time"); while ($dsatz_wunsch = mysql_fetch_assoc($res_wunsch)) { echo "<table border='0' width='98%' rules='rows' >" . "<tr>" . "<td col width='5%' bgcolor='#FFFFFF'>" . $dsatz_wunsch["w_ID"]. "</td>" ........more data output....... . $dsatz_wunsch["in_time"]. "</td>" . "<td col width='24%' bgcolor='#FFFFFF'>"                           . $dsatz_wunsch["dedication"]. "</td>" . "<td col width='5%' bgcolor='#FFFFFF'>"                                 . "<input type='checkbox' name='eint[]' value='" . $dsatz_wun['ID'] ."'>"                      . "</tr>" . "</table>"; } echo "<input type= 'submit' id='send' value='del'>" . "</form>"; $dattz_ids = $_POST['eint']; // // query $query = "DELETE FROM xxxx WHERE" . " ID IN(" . implode(",", $dattz_ids) // . ")"; mysql_query($query) or die ("MySQL-error: " . mysql_error()); ?>     </div>[/code]
  7. I have a problem. I programmed a query to check whether a database field containing a year value (typ varchar(4)) is within a given intervals. The script is like that: $sqlAB="SELECT ......, year FROM .... WHERE ..... AND year >= '$txYearFrom' AND year <= '$txYearTo' AND .... order by ..."; $txYearFrom .. To are a text strings which I read out from input fields like that: <input name="txYearFrom" type="text"> The query result is sometimes wrong. How can I fix that and get reliable results? Btw the database structure can not be changed... Thanks all for a good idea... Adriano kraadde@yahoo.com
  8. I have a problem. I programmed a query to check whether a database field containing a year value (typ varchar(4)) is within a given intervals. The script is like that: $sqlAB="SELECT ......, year FROM .... WHERE ..... AND year >= '$txYearFrom' AND year <= '$txYearTo' AND .... order by ..."; $txYearFrom .. To are a text strings which I read out from input fields like that: <input name="txYearFrom" type="text"> The query result is sometimes wrong. How can I fix that and get reliable results? Btw the database structure can not be changed... Thanks all for a good idea... Adriano kraadde@yahoo.com
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.