PHP - Moved: Can You Recommend A Good Place To Do Php Exercises?
This topic has been moved to Miscellaneous.
http://www.phpfreaks.com/forums/index.php?topic=331627.0 Similar TutorialsThis topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=334552.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=306605.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=334133.0 This topic has been moved to Application Design. http://www.phpfreaks.com/forums/index.php?topic=347419.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=320875.0 This topic has been moved to Other Programming Languages. http://www.phpfreaks.com/forums/index.php?topic=347880.0 This topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=319527.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=308788.0 This topic has been moved to Website Critique. http://www.phpfreaks.com/forums/index.php?topic=355553.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=305934.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=342385.0 QUESTION 1: Read two values, if variables A and B. Place the sum of variables A and B implying its result in the variable X. Present value of variable X after adding the two values. QUESTION 2: The formula to calculate the area of a circle is A = pR2. Since the value of p = 3.14159 sufficient to establish: Read a value for radius, where the variable R. Perform the calculation of the area, boosting the value of R-squared and multiplying by p. Present value of variable A. QUESTION 3: Read two variables A and B. Then calculate the product between them and assign the variable PROD. Then show the variable PROD with corresponding message. Question 4: Read 2 variables A and B, which correspond to two notes of a student. Then calculate the average student, knowing that the note has a weight of 3.5 and a B weighs 7.5. QUESTION 5: Make an algorithm that reads four variables A, B, C and D. Then, if B is greater than C, and D is greater than the sum of A and C to D is greater than the sum of A and B and C and D, respectively, are positive and if the variable is the pair write the message "accepted values" but write "values are not accepted". I nee Help with those Php problems... i will need them solved till monday, because its my apliccatives final test day... Could someone help me? i already solved the question 2. <?php function achararea ( $raio ){ $circulo = $raio * $raio ; $area = pi () * $circulo ; return $area ; } ?> Could someone help me with the others? This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=349747.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=349578.0 This topic has been moved to Application Design. http://www.phpfreaks.com/forums/index.php?topic=321638.0 Well I am working on this new site for fun I don't have any of the development done for you to even look at but I am here trying to see what others would recommend to solving on issue that I have. Ok, well basically what I want to be able to do is allow for other users of the site to "like" a comment that another member has made, and I want to keep track of how many people clicked the link and do what I can to not let them click the like again. What I can see for two options are to 1) in the comment table keep a number that increments every time someone clicks it, and then in a cookie tell the site the link has been clicked so the user does not see the like anymore, but then if the user removes the cookie they will be able to click the link again.(Not to big of a deal I guess) or 2) set up a different table that keeps track of the comment and the user so I can then use sql to count the amount of times that the commentID is in the table and then the user would not be able to click the some comment again this way. (But this just seems like a lot of database space that could be taken up) Any recommendations would be great! Thanks Hello All, I currently code in procedural PHP, but am now in a position to start learning OOP in PHP. Now i'm hoping to get my company to pay for a course in the UK (Ideally in the South East/London but if up North or elsewhere then that's fine). Anyone been to any training courses or heard of any that they can recommend and can post the links to? Thanks I recently had a need to check several arrays, and if an index wasn't set, set a variable to a given value. The code was such that I couldn't perform the isset check all at once. I then thought "wouldn't it be great if I could try the script, and catch the error or warning". Searching a bit, I came across the following script. I am a little nervous, however, that there might be negative consequences of doing so. Thoughts?
set_error_handler(function($errno, $errstr, $errfile, $errline, array $errcontext) { // error was suppressed with the @-operator if (0 === error_reporting()) { return false; } throw new ErrorException($errstr, 0, $errno, $errfile, $errline); }); try { dns_get_record(); } catch (ErrorException $e) { // ... } looking for suggestions and experiences from those of you that use a Password Manager
MySQL cannot store Boolean values and thus I use 0/1. Is there much benefit to cast them as Boolean immediately after querying the database, do whatever PHP processing is required, and then convert them back to 0/1 before writing to the database? One benefit is I can type declare my arguments, but I am debating whether it is worth it. Thanks |