Jump to content

mickeymouse

Members
  • Content Count

    41
  • Joined

  • Last visited

Community Reputation

0 Neutral

About mickeymouse

  • Rank
    Newbie

Previous Fields

  • Languages
    English

Profile Information

  • Location
    France & Canada
  • Interests
    Databased Webs development
  1. How do we prevent Buttons from printing when printing a page? I thought it should something like putting class='noprint' in the button code but that doesn't work. Tks
  2. mickeymouse

    Baffling CSS

    I have a link for a css file but I don't have a css file. Yet my has <p class='five'> (see code below) I'm baffled as to where does my browser get the box, with borders and background color as follows: Also, if I include the css file with the p.five defined with a smaller box, the result is still the same as above. (see my css file attached - perhaps I haven't defined it correctly.) ... <link rel='stylesheet' href='HA_StyleA.css' type='text/css' /> ... print(" <form name='Reg' > <br><br><br><br><font size=4 color='maroon'><b><center> <p class='five'> Select the desired function<br> from the above menu items. <br></font> </b></p> HA_StyleA - Copy.css
  3. Can I have an input tag with no borders?
  4. OK. I found the problem. One of my field parameters for selection did not contain the correct info and the Affected Rows = 0 was indeed correct. It is now working (and Affected Rows is giving me the correct count). Regrets for taking up your time. Thank you.
  5. Very well but 1) How do I test the COUNT? 2) I tried $MyRowCount=mysql_num_rows(); (according to SQL Documentation) and I get 0 rows read, yet the DB has some 1000 rows. 3) Ignoring the counting aspect, I list the rows read with following code but there are no rows. So the real question besides the counting is "Why is it not reading the rows?" while ($row = mysql_fetch_row($Results)) print("...….. Tks
  6. Thank you dsonesuk. It works perfectly (all the time when we do it right) I'd like to give you points but don't know how. Can't see anything on the page that would allow me.
  7. I'm getting 0 in $AffectedRows and get my resulting message "There are no transactions..." Yet, I have many records in my "transactions" DB file. I Can't understand, can't see any errors in my code. I don't get any DB errors nor any other errors. The same code (for other DB files) works fine. $link = mysql_connect($host, $username, $password); if (!$link){die('Not connected : ' . mysql_error());} $db_selected = mysql_select_db($database, $link); if (!$db_selected){die ('Can\'t use ' .$database .':'. mysql_error());} $query = "SELECT * FROM `transactions` "; $Results = mysql_query($query, $link) or die ('Error = '. mysql_error()); $AffectedRows = mysql_affected_rows($link); if($AffectedRows < 1) {print("There are no transactions ……..
  8. I understand that to pass a paramater from one page to another from a call in a function I must have "?param=myparam" following my page id. e.g. function ancesterF(myparam) {location.href='mypage1.php? param=myparam';return false; window.open(location.href); return false;} and to pick-up the paramater in the called page, I need to use: $getmyparam=$_GET['param']; However, it doesn't work. The resulting pick-up is "myparam" instead of the value of "myparam" which is "10006" Does anyone know how to pick-up the value passed? I can't find anything about this in PHP documentation. Many thanks
  9. I tried that but I end up with the value of my $getmyparam being equal to "myparam" instead of the value passed which in my test case is "10006" In my calling function, I confirm the value of "myparam" and it is "10006". CALLING CODE: function ancesterF(myparam) {alert(myparam); <----------------------------------------------------------------------------------This confirms the value "10006" location.href='FT_Search2.php?param=myparam';return false; window.open(location.href); return false;} RECIEVING CODE: $getmyparam =$_GET['param']; print("getmyparam"); <------------------------------- Result = "myparam" not "10006"
  10. Thank you dsonesuk. I should also have asked you how do I capture the param in my called page.
  11. How do I pass a parameter (myparam) to the page I'm calling via a function. function ancesterF(myparam) {location.href=\"FT_Search2.php\";return false; window.open(location.href); return false;} Tks
  12. I'm Baffled. My code (as far as I can see) matches W3 School tutorial example but it doesn't work. My button to go to the function doesn't react (it does if I remove my red text code. "function myDelDB() {var r = Confirm('Delete'); if (r==true) {location.href='CAS_RoulDeleteDB.php'; return false; window.open(location.href); return false;} else{return false;} }"
  13. Wherever I'm using $link is because documentation told me to use it and I always used that and it always worked. As for my problem, it is resolved. My logic was totally wrong. This is the way it should have been: while($Rows = mysql_fetch_row($Results)) {print("Number = $Rows[0],<br>");} My original code covered my (erroneous) thinking that $Rows were Records in the Database instead of $rows being the fields in the records. So sorry to have taken your time. Many thanks
  14. I agree, $row = mysql_fetch_row ($Results) should be before the While loop so I've made the correction but it doesn't make any difference - I still have the unbelievable problem.
  15. The only way I know how to check what is in $Results is by printing it with a While loop but it doesn't work. I figure $Results has to contain the correct info since $AffectedRows = 4. My code to get $Results is: $link = mysql_connect($host, $username, $password); if (!$link){die('Not connected : ' . mysql_error());} $db_selected = mysql_select_db($database, $link); if (!$db_selected){die ('Can\'t use ' .$database .':'. mysql_error());} $query = "SELECT * FROM `spindat` WHERE `hand` <> 'x' "; $Results = mysql_query($query, $link) or die ('Error = '. mysql_error()); $AffectedRows = mysql_affected_rows($link);
×
×
  • Create New...