Jump to content

timothyarden

Members
  • Posts

    149
  • Joined

  • Last visited

Everything posted by timothyarden

  1. Hi Dave, You were missing a parenthesis: To check your code for the error I just spaced it out - below is the code with an error followed by the code without the error echo $this -> Html -> link( 'View/Edit', array( 'action' => 'view', $client['Client']['id'] ), "?" => array( 'nc' => time(), array( 'class' => 'view' ) ); echo $this -> Html -> link( 'View/Edit', array( 'action' => 'view', $client['Client']['id'] ), "?" => array( 'nc' => time(), array( 'class' => 'view' ) ) ); Hope this helps
  2. Not 100% sure but (highlighted text) <?php echo $this->Html->link('View/Edit', array('action' => 'view', $client['Client']['id']), "?" => array('nc' => time(), array('class' => 'view')); ?> I think should have a key Try and see
  3. Might also want to use character type validation http://php.net/manual/en/book.ctype.php
  4. strlen() just returns the length of a given string you could do if(strlen($string) < 1)
  5. Try combining some of the code from the previous link with this one: http://w3schools.com/php/php_ajax_database.asp - use the input from the first and cut out the xml and in the second one cut out the options and keep the stuff for the database and then manipulate it to your need
  6. Sorry your correct, when I was reading it late last night I read it as it's ok to divide by zero, it's just not ok to divide by zero not "it's ok to divide zero, it's just not ok to divide by zero"
  7. Might want to read what you posted a second time: "it's ok to divide zero, it's just not ok to divide by zero"
  8. Here is a link to a similar thing you could use and manipulate the code from: http://w3schools.com/php/php_ajax_livesearch.asp
  9. It has to be that line Thats the only place you are really dividing regardless of the round function: $rating_score =round($total_rate/$count_rating); either the total_rate or count_rating must be zero hope this helps
  10. Just had a brief look over and I'm guessing its this line: $rating_score =round($total_rate/$count_rating); Ill have a quick look at the manual
  11. I think I looked at the first post and just commented that it would be a good idea to upgrade that considering he was using mysql_query
  12. Haha, lol - yep thats as obvious as it gets hey Christian F - thats what I get for commenting late at night.
  13. Can you please post numbers along side your code so we know which line is 868?
  14. Generally on PHP Freaks we don't provide code, thats generally a paid service. You can list a job on the PHP Freaks Freelancing Forum.
  15. Also might be good to use the MySQLi class as the mysql functions are deprecated.
  16. Hi Chris, Here on the PHP Freaks it is much better to copy and paste the code here betwen [ code ] and [ / code ] without any spaces. Could you please do that and then I will read over your code for you. Thanks Timothy
  17. From before DavidAM: That is not going to work, since there is a WHERE clause in the query, the ID's will not likely be consecutive in the results. If its autoincrementing that value they will be consecutive - wont it?
  18. Create an ID column in the table and auto increment the go SELECT WHERE ID == RANDOM NUMBER
  19. Not sure its been a while since Ive done file work but from memory you need to use fopen() to open the file assign it to a variable and put it in the first parameter - read the manual on php.net regarding fopen() php.net/fopen & also php.net/copy
  20. print_r() is used to print arrays (to structure them add the HTML <pre> </pre> tags) Suggest using a foreach loop and adding the values to a string which you then echo after the loop
  21. Yes it is possible Use an if... else If it is valid make it green E-mail Address: <input type="text" style="background:#cfc" "border-color": "#0c0" name="email" value="'.$row6['email'].'" size="19" /><input type="hidden" name="cartid" value="'.$cart.'" />'; else make it another color E-mail Address: <input type="text" style="background:OTHER COLOR (HEX)" "border-color": "#0c0" name="email" value="'.$row6['email'].'" size="19" /><input type="hidden" name="cartid" value="'.$cart.'" />';
  22. On PHP Freaks conventionally you should put your code between // code Can you please do that and then I will read over your code.
  23. Do a register form start a session on it make a form ask user for their unique code submit - check against database add a value to the session to check when the form processes if that value is true display the registration form on the page otherwise display the unique code form
×
×
  • 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.