Jump to content

jeeves245

Members
  • Posts

    145
  • Joined

  • Last visited

Everything posted by jeeves245

  1. Hi all, I got out of the web development game years ago and am now work in a completely different field. I use Wix to manage my website, mainly because it's quick and easy. However I now want to create my own website outside of Wix so I don't have to be tied to their servers anymore. But I want to use an editor that has that simple drag & drop functionality that Wix has. I don't have the time to play with code anymore, so just need something really simple to use. Can anyone suggest a good offline WYSIWYG drag and drop editor? Would be much appreciated
  2. I'm fluent in HTML. Obviously there's something simple that i'm missing. Edit: Ah, I had a play with the code instead of using the designer, and I got it sorted
  3. Hey guys, I have a quick question.. it's probably quite simple but I can't figure it out. I've used one of the built-in templates in Dreamweaver CS4 to design a basic website. What I need to do is insert some text in the grey box on the left side (see attachment). Clicking on it to insert text as usual doesn't work, and I can't insert a new div tag there. Any ideas? [attachment deleted by admin]
  4. Ah.. missed that As you said, happens to the best of us. Cheers.
  5. Hey guys i'm having a bit of trouble with a script... it's just some basic form validation but I can't get it working (I click submit and it submits even if nothing is in the text boxes). The name of the form is "form1" and in the form tags I am putting "onsubmit="return validate_form(this);" Here is the main code, which I am putting between the head tags: function validemail(email) { invalidChars = " /:,;" if (email == "") { return false; } for (i=0; i<invalidChars.length; i++) { badChar = invalidChars.charAt(i); if (email.indexOf(badChar,0) > -1) { return false; } } atPos = email.indexOf("@",1); if (atPos == -1) { return false; } if (email.indexOf("@",atPos+1) > -1) { return false; } periodPos = email.indexOf(".",atPos); if (periodPos == -1) { return false; } if (periodPos+3 > email.length) { return false; } return true; } //This function will validate a form function validateForm(form1) { if (form1.name.value == "") { alert("Please enter your name to proceed!"); form1.name.focus(); return false; } if (form1.comments.value == "") { alert("Please enter a message to proceed!"); form1.comments.focus(); return false; } if (!validemail(form1.email.value)) { alert("Please enter a correct Email address!"); form1.email.focus(); return false; } return true; } Any ideas appreciated.
  6. Never mind... figured it out..
  7. So I did all that. It all works fine when I view the website on my local computer.. but as soon as I upload it to my host, the CSS isn't loading properly and the fonts/sizes etc are all wrong. Do I need to reference the CSS and javascript files in a different way? At the moment I have them in CSS and scripts folders like you said.
  8. Yep makes sense. Thanks for the tips
  9. No worries. I know a lot of other people have the same problem. Writing code is one thing but designing decent graphics and a nice layout is another thing all together Dorky - thanks for the comment. As I said, I used a WYSIWYG editor so the extra style tag was created by the editor itself. Do you think it'd be a good idea to manually take it out?
  10. I have had a lot of experience with the above but i'm absolutely useless at design so I just use a WYSIWYG editor for any kind of front end work. Thanks for the comments.
  11. Hey guys, i'm just after some opinions on my website.. just the layout etc. I'm not a pro or anything so i've just used a WYSIWYG editor. Any comments/suggestions appreciated. www.otbcomputers.co.nz Thanks in advance
  12. Ah, I just incorporated my $_POSTs into that and it worked. Thanks, much appreciated
  13. Are you 100% positive? Try: echo "Name: " . $name . " | E-mail: " . $email . " | Comments: " . $comments . ""; I'm 100% positive. And that line didn't work. I guess I should probably be more specific about the code, as it may make a difference. It's part of code used to send an e-mail. Here are the bits that matter: $body = "Name: $name | E-mail: $email | Comments: $comments "; if (mail($to, $subject, $body, $headers)) { echo("sent"); } else { echo("failed"); } The rest of the code works just fine, it's just not taking the variables...
  14. Hey guys, hopefully this is an easy one... In this line, the variables are not echoing out. The script runs without error though. echo "Name: $name | E-mail: $email | Comments: $comments"; So I tried surround them with "" like so: echo "Name: "$name" | E-mail: "$email" | Comments: "$comments""; I get the error: Parse error: syntax error, unexpected T_VARIABLE in /var/www/vhosts/mputers.co.nz/httpdocs/process.php on line 13 Anyone know the correct way to write that line? Variables definitely contain values. Cheers
  15. Cheers, i'll give it a go and let you know
  16. Sorry, I mean XLSX (Excel spreadsheet) to CSV. Not XSL.
  17. I have an existing script that uploads and processes a CSV file. But I was thinking it might be a good idea to let PHP do the conversion from XLS to CSV as well as upload it. Does PHP have a function to handle this? Thanks.
  18. I'm positive of the file content. I'll give you an example of the file. Let's assume that this is the file (i've censored out address and customer details for privacy reasons). 16/07/2009,customername,170880,1,address1,"address2, address3",,0.10 16/07/2009,customername,170936,1,address1,"address2, address3",,0.91 16/07/2009,customername,170942,1,address1,address2,address3,0.09 So if I uploaded this using the script I posted above, the bottom line is put into the database twice.
  19. No, it takes the last non-empty row of the CSV file and saves it to the database twice.
  20. Yes, solved the problem. But I just ran the script again and a new problem turned up. It is adding the last line of the CSV file into the database twice for some reason. I was just wondering if you might have any idea why
  21. That works great, thank you. Do you have any idea why it might be adding the last line of the CSV file into the database twice?
  22. Thanks for that Although I just thought of a better way I think... What if I take $parts[2] that should ALWAYS have a value in it, and make the for loop like for ($parts) if ($parts[2] != 0) continue; So if $parts[2] does NOT equal 0 (i.e. it DOES have a value), continue. Would that work?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.