Jump to content

mickeymouse

Members
  • Posts

    87
  • Joined

  • Last visited

Posts posted by mickeymouse

  1. Strpos documentation says "If a match is found, the function returns the character position of the first match. If no match is found, it will return FALSE."

    My code:

    $mystrpos=(strpos($row[3],$choice));

    print("T161: choice=$choice  - position in row[3]=$mystrpos<br>");

    Results:

    When $choice is found, the print result shows the character position.  example: row[3]=BAC CAS,   T161: choice=BAC - position in row[3]=0

    But, when not found, it does not return "FALSE"  It returns nothing - I can't even test it.  example: row[3]=BAC CAS,   T161: choice=Fam - position in row[3]=

     

  2. $query = "DELETE * FROM `BACdata` WHERE `userid`='$UserID' AND `Date`='$curdate' AND `seqnum`='$delseqnum' ";
        $Results = mysql_query($query, $link);

    Printing the three paramatres = michele, 24-02-13, 322

    My database record = michele, 24-02-13, 322

    But the record doesn't get deleted. No error messages.

    Any idea why? I just can't see what's wrong.

    thanks

    BACdata.jpg.de2aaae5d57156bac122ea5d453c241a.jpg

  3. See my alert message in my code below. 

    Thank you.

    function getnxt()
    {alert('For this message / alert box, is there a way of 1-Setting the font size, color and alignment (e.g., center)?  2-Eliminating the resulting top heading (name of website) or replacing it?  3-Starting a new line?');
    return false;}

    image.thumb.png.da2280e2ee4bdb1bbec1ba7032f47375.png

  4. Strpos is supposed to give the character position of the first match and FALSE if no match is found.

    Why am I not getting the FALSE?

    $mypos = strpos($tbl, $newnum)

    The $newnum is not in the $tbl but my print("$mypos")  result is nothing.

    What should I be testing for? if I test for 'FALSE' or for '', it doesn't work. I get a negative answer.

  5. I want to get my user's location. I have this code from W3S. I believe it is Java coding on which my skill is zero.

    My question is how do I get the location? How can I access/refer to the result?

    Thanks

  6. Sorry.  I guess I wasn't clear.

    I am using "onsubmit" in Form. My input tag is a "type=submit".  When the user clicks on this 'submit' button more than once (or presses the "Return" key more than once) I end up with multiple entries.  My "onsubmit" goes to a function that checks to see if the input number is valid and if OK the submission is allowed (return true).

    So, how do I prevent multiple submissions from taking place.  There should not be another entry until there is a visible server  response to the first submission.

     

  7. My page allows the user to type in a number and click Enter or press the Enter Key (submit button). My next page then process that number.

    But if the user clicks twice (or presses the Enter Key twice), my next page gets the number twice.

    How can I prevent the user from doing this double entry?  e.g. Can I disable the submit button after it's been used?

    Tks

     

  8. I believe my code matches the W3Shool documentation.

    It works well in W3S example but it doesn't work in my page.

    I get a blank result.

    function myentry()
    {var mycode='B';
    var myres = mycode.fontcolor('red');
    document.getElementryById('lastentry').innerHTML = myres; return true;}

    if I use:   document.EntryForm.lastentry.value = result; return true;}

    I get:     <font color="red">B</font>

    Any idea why?

    Tks

  9. I want to send an e-mail.
    Is this not correct code?
    The first time I tested it, the e-mail went through.
    Now it just doesn't go.
    Do I need to have an e-mail account with my web service provider in order to have my code send an e-mail?
    
    $to = $MyEMailaddr;
    $subject = 'My Website';
    $message = $mymsg;
    $headers = 'UserID & Password' . '\r\n';
    mail($to,$subject,$message,$headers);
    
    I'm sure $MyEMailaddr contains the correct e-mail address (I have the proof).  Same with $Mymsg.

     

  10. I don't quite understand all this but I will work on it.  However, I've defined a button with style='width:100'  and  it stays the same width no matter what value I assign and if my value is greater than the width, the extra just doesn't show - that's why I was trying to get word wrap.

  11. How can I get word wrap for button text?
    I've tried several ways (one below) but nothing works.
    
    <style type=\"text/css\">
    w.{word-wrap:break-word;}
    </style>
    
    <input type='submit' style='background-color:red;width:430;height:150;font-size:40;font-weight:bold' class='w' value='RAYER les DERNIER (de 1 à 99)>

     

  12. Thanks.  But what is the problem now?I keep getting the alert message no matter if my slice is a,l or any thing else.
    
    function mychk(myfld)
    {with (myfld)
    {if(bud.checked==true)
        {var str = myfld.value;
        if(str.slice(-1) == 'a' || str.slice(-1) == 'l');
            {alert('TRANSACTIONS ARE NOT POSSIBLE FOR a OR l ACCOUNTS.');}  <------- I keep getting the message no matter what.
        }
    }}

     

  13. Trying to get the last character of a string but get absolutely nothing - no result, not even an alert execution.
    What's wrong with my substr?  It seems to me it agrees with the W3S documentation.
    
    function mychk(myfld)
    {with (myfld)
    {if(bud.checked==true)
        {var x = myfld.value;
        alert(x);  <--------------------------- Shows correct results
        var r = substr(myfld.value,-0,1);  <---------Trying to get thelast character of the string.
        alert(r);  <------------------------------ No alert at all
        }
    }}
        NOT ANYBETTER IF I USE  
        	var r = substr(x,-0,1);
        	alert(r);  <-------------Still no alert.
                                                   
                                                   

     

  14. 
    $mydt=$mymm.','.$mydd.','.$myyr;
    print("$mydt<br>");  ------------------>= 1,1,2020
    $myjd=gregoriantojd($mydt);
    print("$myjd<br>");  ------------------>= blank (why???)
    $myname=jdmonthname($myjd,0);
    print("$myname<br>");  ---------------->= blank (why???)
    
    W3 Documentation:
    $jd=gregoriantojd(1,13,1998);
    echo jdmonthname($jd,0);  ------------>= Jan
    
    It seems to me my code agrees with the documentation but it doesn't work.

     

  15. With this, I get no borders (as requested):
    <input readonly style='border:none;color:black;text-align:left;width:100;font-size:16'  value='$ActNm'>
    
    With this, I get borders all around while I just want a bottom border.
    <input readonly style='border:bottom;color:black;text-align:left;width:100;font-size:16'  value='$ActNm'>

     

  16. Thanks but this wont do the job.  I dont think using <div> and </div> tags for every <input...>  tag I have is the way to do it.  What I'm looking for is bottom borders for my <input...> tag.

    Also, the W3 example of margins doesn't even work in the W3 documentation itself.  Go there and try to modify the margin sizes!

  17. How do I get bottom borders or left borders only?

    In my input tag, I've used

    style='border:none'  --- works fine.

    style='border:left'  --- I get all borders.

    style='border:bottom'  --- I get all borders.

    TKS

  18. the dump, mor precisely, the print is

    AcctNameA Array[1] Array[2] Array[3] ... Array[12]

    AcctNameB Array[1] Array[2] Array[3] ... Array[12]

    etc for each account name entry.

    Obviously my $amts[$cntr][1 to 12] doesn't work. But what should it be?

×
×
  • Create New...