Jump to content

MGLP

Members
  • Posts

    28
  • Joined

  • Last visited

Everything posted by MGLP

  1. I have buttons on a page which I don't want to come out on a print. My " class='noprint' " in my following code doesn't work. <input type='Button' value='Print' class='noprint' onclick='printpage()'> Tks
  2. I've been using this type of code in loads of files / websites and it works perfectly, e.g. below from another of my files works fine. About the backslashes, I need to put those in for the quotes. Otherwise I get and error. If I remember correctly, it's PHP requirement or is it Java? Don't know but it works with backslash and it doesn't work without backslash. function mycontacts() {location.href=\"FT_Contacts.php\"; return false; window.open(location.href); return false;} <input type=\"button\" value=\"Contacts\" onclick=\"mycontacts()\">
  3. I have a button with onclick calling a function but nothing happens - no execution, no error msgs, just nothing but every thing else works perfectly. My code is: function goBack() {location.href=\"FT_Tree.php\"; return false; window.open(location.href); return false;} <input type=\"Button\" value=\"Home\" class=\"noprint\" style=\"background-color:lightgrey;height:30;width:150\" onclick=\"goBack()\">
  4. Why do I get my image upside-down with the following? <img src=\"Exterior 13.jpg\" alt=\"FerPic 01.jpg\" width=\"600\" height=\"400\"> If I change the jpg file picture to upside-down, I get it upside-down using the same image tag. Tks
  5. I tried what you said but when I put the {}, I ended up with the little black square with the white X for all of my images. Re "checking the source code that is generated" I don't understand or don't know how to do that. All I know is my source code, I.e., my PHP file. I've added a print command to print $Row[25] (which is the file name of the image) before the "img" tag is executed and the name is quite correct. The file extension is not present but I don't think that matters (It works for other image files).
  6. Sorry. I was probably not clear and my apologies for the error in the code I posted. My code is actually: [<img src=\"$Row[28]\" height=\"271\" width=\"380\">] My "$Rows" comes from my code after getting a record from my database: [$Row = mysql_fetch_row($Results);] $Row[28] contains the file name/reference. It's not a problem. It works fine for many of the image files (all JPG) I use in my testing. But some of them show up as that little black box with a white X in it. Yet when I open these files directly with MS Picture Manager or other software, there's no problem. Something else has come up. Some of my images come out sleeping even if they have been saved standing (I hope I'm clear on that).
  7. This might not be an HTML problem but can anyone tell me why I get a little black square with a white X for [<img src=$Row[25] height=\"325\" width=\"380\">]? My image files are jpg and I have no problem when I open them directly using MS Picture Manager or anything else. Thank you
  8. Absolutely. I should have know. Many thanks
  9. The Input tag type="file" ... will upload a file but how do we delete such uploaded files? When my user deletes his record (which contains the path/name to his uploaded file) from my database, I want to delete his file also. But I have absolutely no idea how to do it. I am totally baffled! Thanks for the much needed help.
  10. I get "Object of class DateInterval could not be converted to int" for my code (2nd line) [$mytoday=date('Y'."-".'m'."-".'d'); if (date_diff(date_create($mytoday),date_create($Row[23]))<32)] Note: My $mytoday = 2018-04-27 and my $Row[23] = 2018-04-26 Yet, the PHP tutorial says: [$date1=date_create("2013-03-15");$date2=date_create("2013-12-12");$diff=date_diff($date1,$date2);] So my code should work but it doesn't. I put the exact code given by the PHP tutorial in my PHP file and it doesn't work. I get the same error message as with my code. Thanks for your help.
  11. Sorry to have disturbed. Upon further research, it seems there was something wrong with the image file and not a HTML matter.
  12. Why do I get a little black square with a white X for [<img src=$Row[25] height=\"325\" width=\"380\">]? $Row[25] contains the file name and that works fine with my next 9 image tags. It's a problem with the first image only; even if I change that image file. My file is a jpg and I have no problem when I open it directly using MS Picture Manager or anything else.
  13. Many thanks. Works beautifully!
  14. In my form file I have [<input type=\"checkbox\" name=\"stove\" id=\"stove\" value=\"y\">] I use [method=\"POST\"] on Submit. In my next file I have [$stove=$_POST['stove'];] which works fine if the box was checked but if the box was not checked, I get error "Notice: Undefined index: stove in...." How can I test if the checkbox has been checked? Tks
  15. MGLP

    Language Problem

    The database data is not a problem. My problem was with things like forms where the form needs to serve two different languages. So all in all it seems I need to make two sets of php files - one for each language or one set with logic to display an English form or a French form. Many thanks for your help.
  16. MGLP

    Language Problem

    So if I understand you correctly, I need to have 2 sets of php files - 1 English and 1 French - and go to one of these depending on the user's language choice? Am I correct?
  17. MGLP

    Language Problem

    In the euphoria of having gotten the solution to my first problem/question I forgot that I didn't get a reply to my 2nd problem/question which was: 2) If I want to have a choice of French and English, do I need to have 2 separate set of files or is there a translation facility and if so, can you provide me the guidance. I should perhaps have also said '... or 2 sets of code?' Example: my form says: Name:____________ Address: _____________ etc., etc., etc. but if the user has selected French, then I want: Nom:_____________ Adresse:______________ etc., etc., etc.
  18. MGLP

    Language Problem

    Works great. Many Thanks. There is so much to learn!
  19. MGLP

    Language Problem

    re your point (1), how do I save files using UTF-8? My code is in Notepad files and I save them as PHP files. re your point (2), ok, I've put in the <meta charset("UTF-8")> in my code right after the <head> tag but still have the problem (I suppose because of point (1) not done. I understand your point 3 about the database and will do.
  20. 1) I have French wording in my site. French has accents. The accented letters show up as a ? in a diamond shape, i.e., �. How can I get the correct accented letters to show? 2) If I want to have a choice of French and English, do I need to have 2 separate set of files or is there a translation facility and if so, can you provide me the guidance. Thank you.
  21. I've tried this code and it doesn't work and my Function gets executed on subit because I get the alert message from the first test.
  22. My HTML is: [While($cntr < $NumRcds) {$cntr=$cntr+1; print("[<input type=\"radio\" name=\"choice\" id=\"rcd\" value=\"$Row[6]\"><br>");}] which gives me many records listed with each having a radio button. Upon Submit, I want to test if at least 1 button has been checked. My Java is the following and I've tried various other versions non of which work. Can you tell me what the code should be. [function formcheck() {if(name.choice.checked==true){return true;} else{alert(\"At least one record must be selected in order to DELETE.\");return false;}}] Thank you
  23. Thank you dsonesuk. From what I can see it was because the "name" and "id" were both "rcd". As soon as I mad the "name" different, it worked beautifully. Many thanks.
×
×
  • Create New...