Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by mickeymouse

  1. Sorry I didn't want to bother you with all the code (now below) and sorry I didn't explain the problem properly. My problem is not with the logic but with the syntax. What happens is I get Parse error: syntax error, unexpected '[', expecting ']' If I don't have a solution to this, then I can try it as you suggest - just push results to the end. But I would prefer to have a solution to my syntax problem. Tks. $childcnt=1; $childdisp=11; $childtotal = 0; while($childcnt<10) {if($Row[$childdisp]<>"") {//================= GET CHILD ========================================= $query = "SELECT * FROM names WHERE `Ref`='$Row[$childdisp]' "; $Results = mysql_query($query, $link) or die ('Error = '. mysql_error()); $AffectedRows = mysql_affected_rows($link); if($AffectedRows < 1) {$Child[$childcnt[1]]=="$Row[$childdisp] Not in the Database."; $Child[$childcnt[2]]=="B";} else {$Child[$childcnt] = mysql_fetch_row($Results); print("$Child[$childcnt[1]] - $Child[$childcnt[2]]");} <-------SYNTAX PROBLEM???? $childcnt = $childcnt + 1; $childdisp = $childdisp + 1; $childtotal = $childtotal + 1;} else {$childcnt = 10;} }
  2. After a query which is iterative depending on a variable count (like $childcnt between 1 & 10), I place the data into an array $Cild[$childcnt] But then I can't access the data within each array, Is my code not correct? $Child[$childcnt] = mysql_fetch_row($Results); print("$Child[$childcnt[1]] - $Child[$childcnt[2]]"); Tks
  3. I have this function code:function myadmin(){location.href=\"HA_AdminChoices.php\";return false;window.open(location.href); return false;} and I have this code to call the function:if ($auth=="a") {myadmin();} But I get this error message:Fatal error: Call to undefined function myadmin() Don't I have the correct way of calling a function? ThanksMickey
  4. Beautiful!Many thanksMickey
  5. Tried it but doesn't work.Is this what you meant?<input readonly size=\"10\" style=\"white-space:nowrap;color:maroon;text-align:left\" value=\"Date\"><input readonly size=\"33\" style=\"white-space:nowrap;color:maroon;text-align:left\" value=\"Description\"><input readonly size=\"10\" style=\"white-space:nowrap;color:maroon;text-align:right\" value=\"Amount\"> <input readonly size=\"15\" style=\"white-space:nowrap;color:maroon;text-align:left\" value=\"From Account\"><input readonly size=\"15\" style=\"white-space:nowrap;color:maroon;text-align:left\" value=\"To Account\">
  6. W3Schools says "If the width attribute is not set, a table takes up the space it needs to display the table data. Problem: I have no width attribute but the width displayed is only a bit more than the screen width and it takes 3 rows to display the data instead of displaying all in one row. I do not have a CSS defining the width. If I define the width in the table tag as width="5000", my data iscorrectly displayed in one row. But I don't want to use this methodbecause the length of my row is variable from one user to another.
  • Create New...