Search results

  1. Q

    php functions within functions?

    The other page must be included (or required) before it's functions are called. The variables must also be declared global in both functions.. e.g. // page1.php <?php require_once("page2.php"); firstFunction(); function firstFunction() { global $x, $y; secondFunction(); echo $x . ", " ...
  2. Q

    In Java, does HTMLDocument have a max length that it can read in from a HTML document?

    Hi, I've never used this class but I found 2 methods that might help explain what is going on.. getTokenThreshold() setTokenThreshold(int n) http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/text/html/HTMLDocument.html Good luck!
  3. Q

    Anyone willing to help me learn how to set up a sign up page using PHP and AJAX on Live?

    There's only one benefit of ajax and that is that it allows a pages content to be updated without the page reloading itself. For what you are trying to do you have to ask yourself if it is really necessary. And bear in mind that some old timers still have javascript disabled on their web...
  4. Q

    I want to make a website so I can play around with HTML and new things that I learn,...

    You can put lots of things on your website! What are your interests? Just go for it!
  5. Q

    Do i at least need to learn html, xhtml and css for dreamweaver to make a

    Yes, you need to know them. w3schools.com has the best tutorials for learning them. HTML, XHTML then CSS -- in that order. You shouldn't find it too difficult. edit.. If you know these then you can create a web-site directly in a code editing software (or just notepad). Without knowing them you...
  6. Q

    Do i at least need to learn html, xhtml and css for dreamweaver to make a

    Yes, you need to know them. w3schools.com has the best tutorials for learning them. HTML, XHTML then CSS -- in that order. You shouldn't find it too difficult. edit.. If you know these then you can create a web-site directly in a code editing software (or just notepad). Without knowing them you...
  7. Q

    please help> mysql php sorting issues?

    You're not giving us enough information. Exactly how do you want the values sorted? Do you want to include strings that contain numbers? It might help if you give an example of some typical values and how you want them to be sorted.
  8. Q

    I'm trying to build my first PHP website and have a question.?

    Use require_once for all external code on the page. e.g. <!-- include left navigation menu sytem --> <div id='leftNav'> <?php require_once('left_nav.php'); ?> </div>
  9. Q

    Why does this php not work for my login?

    What error messages are you getting?
  10. Q

    PHP | Command Prompt | Erase stuff that was echo'd?

    PHP has an 'exec' function which runs commands.. but the problem is that the command for clearing the screen is different on different operating systems. I came up with this. It's basic but it does the job (kind of) and it will work on any system: <?php echo "Before clear screen"; $lines =...
  11. Q

    PHP: Issue with deleting files from server?

    You are thinking along the right lines.. but its not cookies causing the problem. The problem is with the users browser cache displaying a saved version of the image. I also had this problem and found this solution. What you do is wherever the image is displayed it has a query string attached...
  12. Q

    A PHP Array of MYSQL results makes everything null?

    You made a spelling error when you initialised $resultarray. Another thing to watch out for is single quotes in sql queries.. they can't be used on table names or table field names. Only use them on PHP variables or expressions.. e.g. $result1 = mysql_query("SELECT * FROM `shelf 1` WHERE Item...
  13. Q

    Hi, Im 12 and my name is Brooke. I am a web designer. And I have a question about...

    Hi, We need more information.. if you can post your code here someone might be able to help.. You will need to paste the html code and the php code that it navigates to. Make sure both bits of code are headed with their page name. Also be sure to remove any private information such as email...
  14. Q

    I have taken about 4 pregnancy tests within the last month....?

    all were negative. I was on birth control and I missed my last period. Then I figured that it had something to do with the bc because I had been taking it irregularly. So I took a pg test to be sure. It was negative. So I stopped taking the bc just to see if that was the reason. My period was...
  15. Q

    How to validate a form field in php?

    Hi, You can try this.. /* First you need to remove any special characters you wish to keep, The new string (without the desired special characters) we will call '$split'. Let's say we want to allow ' - and spaces: */ $c['name'] = "José-' "; $split = implode(preg_split('/[\s\'-]+/'...
  16. Q

    How to validate a form field in php?

    Hi, You can try this.. /* First you need to remove any special characters you wish to keep, The new string (without the desired special characters) we will call '$split'. Let's say we want to allow ' - and spaces: */ $c['name'] = "José-' "; $split = implode(preg_split('/[\s\'-]+/'...
  17. Q

    Using PHP repetitive content to create navigation bar?

    You can include a html file.. but it will be static. If you want to include dynamic content you will need to include another php file that generates the content dynamically e.g. it could hold an array of quotes e.g. 365 quotes -- one for each day of the year. It would also need to store the date...
  18. Q

    I have a php source code. How do I use it?

    If you're using it on your pc with windows I recommend wampserver. Once you've installed wampserver you then put the php file in the 'www' folder (accessed from the UI in the system tray). But make sure you create a project folder. Then go to wampserver again and select 'localhost'. You will...
  19. Q

    I have a php source code. How do I use it?

    If you're using it on your pc with windows I recommend wampserver. Once you've installed wampserver you then put the php file in the 'www' folder (accessed from the UI in the system tray). But make sure you create a project folder. Then go to wampserver again and select 'localhost'. You will...
Back
Top