Jump to content

RichardRotterdam

Members
  • Posts

    1,509
  • Joined

  • Last visited

Everything posted by RichardRotterdam

  1. Trouble is I need to finish it by Wednesday, I can do it from scratch, but wondered if I could fit this in too. The main features it would need are : Templating, Multilingual and an Admin area where users can update the pages or add new content. From what I've found yii or prado looks quite good. Any other suggestions/comments? If speed is of the essence then perhaps you're better of not using a framework if you are not already familliar with one. If you have familiarized yourself with one of the existing frameworks then indeed it can safe you time. But keep in mind that learning to work with a framework consumes time. As for other frameworks browser around on this board there are plenty of topics on PHP frameworks.
  2. There was a similar topic not so long ago, it might be usefull to you. http://www.phpfreaks.com/forums/index.php/topic,262800.msg1238113.html#msg1238113 You might also want to do a search on this forum I'm this issue has been discussed many times.
  3. You might want to look into mod_rewrite
  4. We need more info in order to give usefull help. What is the question just a error message isn't very helpfull. Can you post the relevant code that causes the error.
  5. This does sound more like you're actually willing to learn instead of makeing someone write it for you which is good. Do be aware that when you combine regular form fields such as text input radio's and select pulldows with a file/image upload field the validation can become tricky. For example, a user forgot to fill in the email field when this is a required field. This when he did select an image for uploading in the form. After the page got submitted he will receive a message where saying "you forgot to enter your email" (or something like that). Now since the user already selected the image you would want this image to be re-selected. That is a bit tricky. Concerning the Blobtype vs storing just the name of the uploaded image. What i see mostly is that an image name is being stored inside the db. That way you can just echo out the image name instead of using a seperate php to fetch the image and put that in the image tag. Let me elaborate that with a code sniplet. If you would just store the image name inside the db you could do something like: <img src="<?php echo $image_name;?>" /> If you would use a blob type you would need a separate php script to echo out the image like so: <img src="fetch_image.php?image_id=69" />
  6. http://www.lmgtfy.com/?q=html+form http://www.lmgtfy.com/?q=php+file+upload http://www.lmgtfy.com/?q=php+image+upload http://www.lmgtfy.com/?q=php+form+validation http://www.lmgtfy.com/?q=recaptcha
  7. Well if you want an ajax solution the javascript part is the most important part to focus on. This is where you would handle the post/get request, fetching the form values and updating the mainpage. I usually don't use ajax for uploading files I find traditional forms suffient. However take a look at the following link http://digitarald.de/project/fancyupload/3-0/showcase/attach-a-file/. It doesn't use a iframe, however it does use flash. But it does demonstrate that you don't need an iframe.
  8. You don't need an iframe to make it work. What does your javascript look like? I also notice a difference in your previous code in comparison with the form code you posted. the following: onsubmit="ajaxUpload(); return false" does not correspond with: <form enctype="multipart/form-data" action="php/testimonial.php" method="post" onsubmit="return false" target="frame"> now where did the ajaxUpload function go?
  9. If the final project is within a company you could have a brainstorm session with your collegesto come up with ideas. Usually these college projects have to be innovative where creating something that already exists such as a social network might not be the best way to go. Maybe you could do a little research on type of user before you do this final project. Think of what a particular group would want to have to fulfill a special need that there is currently no application for.
  10. I like the look of that layout. Just one thing. I'd make the text white for better readability. The blue on black might look fancier but the readability is more important.
  11. What??? Wouldn't you want to wear these smashing spandex just like dad? [attachment deleted by admin]
  12. It does work well sort of. But why on earth are you using a timeout function to check it every few seconds? If you have firebug check your "Net" tab and you will notice it does do the ajax call. It just doesn't send the value of the email use the [ url ] [/ url ] tags for links http://cyberphix.com/page1.php
  13. Hehe to be honest I actually had to double check if I wasn't saying anything incorrect myself here. Turns out the array index fix wouldn't have been enough to fix it. So just a little addon to the information already given by Nightslyr. Without the closure fix the reference to the correct preview box will be screwed up. The output on the keyup will always be the last previewBox. So that's what the closure fix was for. Didn't knew before so I learned something new too here.
  14. No you don't , however Nightslyr uses the unobtrusive notation which is IMHO easier to read and easier to adjust over embedded javascript events such as: <input onclick=functionName() /> It's most likely he hasn't tested the code but other then that the script is pretty much all you need all written out for you. I'm gonna be mean and not correct it for you. Instead I am going to give you a hint so you understand why it doesn't work. Notice the loop?? it starts with 0 while your id's begin with 1
  15. I think you are missing what this stands for Check the following: <textarea id="theInput2" onkeyup="updatePreview(this);"></textarea> In this code you pass "this" as arguement. "this" stands for the textarea element. the value of this here is the textarea as an object. in the following function is where it goes wrong function updatePreview(){ var theInput = document.getElementById(this); var thePreview = document.getElementById(this); this.innerHTML = this.value; } In the function there is no param set where you are trying to pass an element here is an example that will show the value of textarea function updatePreview(textareaElement){ var value = textareaElement.value; //has the value of the texarea /** *the rest of your preview function here */ }
  16. He meant something like: $allowed_types = array("image/png","image/gif","image/jpeg","image/pjpeg"); if(in_array($_FILES[$filename]['type'],$allowed_types ){ // upload file } Also added "image/pjpeg" to the array. IE sometimes sees a jpeg as pjeg somehow.
  17. You got a re-up on that link? Thanks Was Doug Crockford the author of this book? I watched this video with the title "Javascript the Good Parts" which is presented by Doug crockford. Maybe others will find this video usefull, beware though it's a long one.
  18. It's marked red in the included image [attachment deleted by admin]
  19. any html element inside the body tag yes
  20. If you have firebug you can see what gets clicked in the console tab <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('html body *').click(function(){ console.log($(this)); }); }); </script>
  21. you didn't quote the values in the array This: echo "<option value=\"$row[model]\">$row[brand]</option>"; Should be like: echo "<option value=\"{$row['model']}\">{$row['brand']}</option>";
  22. Actually it is css and html related not really php. Have you tried text-align:right or/and float:right?
  23. In the firebug tab named "Net" do you see the ajax script called correctly?
  24. Hope you weren't wearing your tron outfit http://www.youtube.com/watch?v=QPON5i7Iivw I wanted to borrow that one.
  25. For firefox do you have the firebug or webdeveloper plugin installed? If so what javascript error do you receive? Do you receive any js errors at all?
×
×
  • 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.