Jump to content

hanlonj

Members
  • Posts

    38
  • Joined

  • Last visited

    Never

Everything posted by hanlonj

  1. Hi, Thanks for all the replies. I know what AJAX is and maybe I phrased my question wrongly. I really meant to say, would my Javascript editor be ok to develop a simple AJAX application in. Thanks again guys. You're really fast. hj
  2. Hi, I have an image on my website with text floated right of the image. I have a footer immediately below both. Here's the problem. The image height is higher than the text. This means the image dips to cover part of the footer. Apart from reducing the height of my image, is there any handy CSS way of dealing with this? If I'm being unclear please let me know. hj
  3. Can you expand a bit on this please?Do I need to set up everything in the form as an array then? hj
  4. Hi, I've been doing a good bit with php lately and every site I work on wants their forms validated. Is there any possible way to write a generic form validator even for forms that are completely different? I know this sounds like a weird request but being programmers, aren't we supposed to re-use code. I'm sure you lot do this all the time but can you let me know how you re-use code in this instance? hj
  5. Hi, I am just trying to get to grips with passing a variable through a query string from one script to another. So I want to declare a variable e.g. $myString on the first page. I then want to append it to a link e.g. <?php $myString = "This is my String!"; ?> // back to the html part of the page <a href = "anotherPage.php?<?php $myString ?>">Another Page</a> I then want the "anotherPage.php" to print the contents of $myString to the screen. My attempt is this but it's not working: <?php $_GET[$myString]; echo "$myString"; ?> Can anyone help here please? hj
  6. Yes, it's just on my local machine at the moment so I presume the windows default setting for folders will suit? Just to be sure I have opened it up for sharing and it still doesn't work.Is there any obvious bug in the code? stoney
  7. Hi, I've just been reading the PHP manual and they say that SESSIONS are based on cookies. So does this mean that in order for a SESSION to work, that cookies must be turned on in a browser? Stoney
  8. Hi, The following code is supposed to upload a file to a directory on my local testing server called "upload_directory". It get's it's info from a simple file upload form. It echoes to the screen that "File was moved!" but when I check if it has been moved, it hasn't. Any ideas? <?php $file_dir = "..\upload_directory"; foreach ($_FILES as $file_name => $file_array){ echo "path: ".$file_array['tmp_name']. "<br>\n"; echo "name: ".$file_array['name']. "<br>\n"; echo "type: ".$file_array['type']. "<br>\n"; echo "size: ".$file_array['size']. "<br>\n"; if (is_uploaded_file($file_array['tmp_name'])){ move_uploaded_file($file_array['tmp_name'], "\$file_dir\$file_array['name']") or die ("Couldn't Copy!"); echo "File was moved!<br><br>"; } } ?>
  9. Take a look at this link man. http://www.phpfreaks.com/tutorials.php hj
  10. Guys, Can someone let me know why one would use strip slashes or add slashes functions. I know what they do but cannot see the exact use for them e.g. if i have a textfield and encase it in an stripslashes function, it will escape any back slashes etc...What advantage is this please? Hanlonj
  11. Guys, Firstly, get off yer high horses. Dreamweaver cannot add any messy code if you're hand coding in code view, come on now, whoever said that is being silly. Of course DW writes messy code when you use the built in Dreamweaver functions but who said anything about that? It is no different to notepad++ when being used as a text editor. Does anyone agree with me here? Gossard
  12. Excellent as per Usual you php freaks! Thanks a mill. Solved. Stoney
  13. I handcode a lot of php and html but I use Dreamweaver in the "code view" as it highlights php blocks of code and makes it easy to see if the syntax is incorrect e.g. if i forget to put inverted commas around a string, the n the string will not be shown in red font as opposed to black/blue for php code. To be honest, with php, you will at some stage need to return a webpage to the user from a php script and Dreamweaver cannot do this very well, so you will probably need to handcode the html within php code. Hope that doesn't sound too complicated but YES, you should learn html in detail. Hope this helps. Stoney
  14. Hi, I have an html form and a lot of form validation in my processing script. I use many "if" statements before I get to the part of the script where the form contents are emailed to a company. Here is my question, my script validates all fields in the form but if it finds an error it notifies the user to try again, however, the program continues to execute down to the "mail()" function no matter what errors are on the form. I have tried to use "break;" at the end of each "if" statement but it won't work. Any suggestions on how to stop the program if my error checking traps an error? stoney
  15. Hi, I have a form on my site for people to register with my company. I receive the form with the details via email which is fine. Is it possible to send an altered version of the form to the person who filled it out also i.e. a sort of automated confirmation email of their details. Can this be done from the same script which sends the original email? Thanks hj
  16. Thanks.Uppercase/lowecase conflict. sorted now. hj
  17. Thanks guys. Another thing, I have all my form fields stored in variables and they are all being passed to my processor file except for one. It's a "text area" and when I echo it, it displays blank. It is inside the form and variable names are correct. I cannot figure this out. Is there anything different about text areas? hj
  18. Hi, I have a number of lines of code which display information to the screen. <code> $msg .= "Name : $name \n"; $msg .= "Address : $address \n"; </code> I want to be able to put tabs in between the "Name" and "$name" so I can align all the data in a column to look easier on the eye. How do I do this? I think it's something like "/t" but i'm not sure. hj
  19. I have a group of textboxes that ask the user which hours they prefer to work e.g. checkBox1 = evenings, checkBox 2 = mornings etc. I know now that I can name the check boxes and give them each a value which will work fine for gathering information. But I saw somewhere that you should really use arrays in matters like this. Can anyone help with the array thing? hj
  20. Hi Guys, I haven't used php for a while and so I need a pointer in the right direction. This is the problem: (This is for a friends' company so I have no say over adding a database etc.) I have a form and it includes textfields, groups of check boxes and goups of radio buttons. I want the user to fill out the form ( I can handle the form validation stuff myself). I then want the user to hit "Send" and the form comes to me via email (i.e. no database usage). Please see: http://grungefreak.com/register.php I am not too good with checkboxes and radio buttons. Can someone give me some high level advice on how I would gather all the info. and send via email without using a database. I realise this is a very broad question so hit me back with some questions if you like. Hanlonj
  21. And just to further add to this, that date (1st Jan 1970)is known as the "Unix Epoch" HJ
  22. Hi, I recently downloaded SMF to use on a website and I want to use an RSS feed in a "News" section on the site. I can get the RSS feed that I need in XML format but I have no experience with XML and so could anyone point me in the right direction for using this feed on my website? Hanlonj
  23. hanlonj

    Headers

    You would need to explain what type of formatting you are using e.g. CSS,tables etc.It's impossible to tell what your problem is from this post.Alternatively, you could post a code snippet to clarify. Hanlonj
  24. I want to pass the value if a variable to another page by attaching it to the end of the href. something like this:[code]<a href "nextPage.php?myValue='My Value'">Next Page</a>[/code] I then want to grab it on the next page using like: [code]$msg = $_GET[myValue][/code] Then I want to print this value to the screen like: [code]echo $msg;[/code] I can't seem to get it to work but I think it's just a small syntax problem. Can anyone give me a snippet example of how I would go about this please or point me in the right direction? Thank you. John
×
×
  • 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.