Jump to content

mickeymouse

Members
  • Content Count

    30
  • 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. 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;} }"
  2. 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
  3. 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.
  4. 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);
  5. My $AffectedRows = 4 which matches my database rows but when I print via the following code only row 0 gets printed - screen output below. $cntr=0; while($AffectedRows > $cntr) {$row = mysql_fetch_row($Results); print("Number = $row[$cntr]<br>"); $cntr++;}
  6. I don't know why I am getting "011" instead of "2" after 2 times through my function. My code is: <input name=\"ent2a\" type='number' id=\"ent2a\" size=\"1\" style=\"text-align:center\" MaxLength=2 value=0 onblur=\"chkent(ent2a)\"> <input id='cntR' type='number' size='1' MaxLength=2 value=0> function chkent(entry) {with (entry); var e = entry.value; if(e==1){cntR.value = cntR.value + 1;return false;} return false;}
  7. Isn't this code correct? I'm trying to test for the length of an input field when submit is clicked. function formcheck() {if(stdcd.value.length < 9){alert(\"MUST BE 9 CHARACTERS.\");return false;} return true;} Thanks
  8. Isn't this code correct? I'm trying to test for the length of an input field when submit is clicked. function formcheck() {if(stdcd.value.length < 9){alert(\"MUST BE 9 CHARACTERS.\");return false;} return true;} Thanks
  9. {print("<option value=$row[1]>$row[1]</option>");} My $row[1] contains multiple words but only the first word is posted to the next file. Am I not allowed to have multiple word entries? Thank you
  10. How do we define the width for a Dropdown Box? My code is: print("<select name='title'> <option style='color:maroon; font-size:bold' name='title'>$title</option>"); while ($row = mysql_fetch_row($Results)) {print("<option value=$row[1]>$row[1]</option>");} print("</select>");. All of this works fine except I don't know where to define the width and can't find it in the W3S HRML documentation. Thank you
  11. It works perfectly on my other forms so it's not a browser related problem. I'll look at the link you gave me in more detail later but right now I would prefer to find the problem and fix it rather than venture into new stuff at this time. As I said, it works in my other forms so I don't see why it shouldn't work in this one. Thanks for your help and thanks for moving the item to Javascript - I keep thinking these functions I've coded are PHP - sorry about that.
  12. 1) Shouldn't the traditional way still work. 2) Don't know how to do the modern way.
  13. Shouldn't this code return me to my from and not take action to open the next program/file. function formcheck(myform) {alert('Form Check.'); return false;} with the following form parameters: <form name='AmendForm' action='FT_AmendUpdate.php' method='POST' onsubmit='return formcheck(AmendForm)'> Whether I use return true or return false, the submit displays the "Form Check" message and then opens the next program/file: FT_AmendUpdate.php
  14. OK. It looks like I'm using the wrong tag to get my box and write-up in the box. It seems I should be using Table tag which I've now tried. However, the width or max-width is not working. I show 50% but the box takes up the width of me widest line of text.
  15. My css definition is: p.six {width: 50%; height: 250px; margin-top: 30px; margin-left: auto; margin-right: auto; margin-bottom: 0px; border-style: solid; border width: 2px; border-color: blue; align: center; text-align: center; padding: 30px; background-color:white} Whatever I do with the "height" specification or even remove it completely, the height of my box remains the same at the original 250px. Actually, just noticed that a few other things don't work - like the width and background-color. I change these and nothing happens; it retains the original specs.
×
×
  • Create New...