Jump to content
Larry Ullman's Book Forums

jabsalud

Members
  • Content Count

    33
  • Joined

  • Last visited

Everything posted by jabsalud

  1. does that means javascript's sole purpose is to add interactivity for your site? so that it makes your website more beautiful?
  2. no its not an assignment. i have tried it but the output is this +2 0 4 8 12 +4 0 4 8 12 +6 0 4 8 12 +8 0 4 8 12 so what i am asking is i cant separate the loop that will increment by 4. what i wanted to do is to alternate them by two's as i have given the output. its not an assignment trust me. all im asking is for your help i need the actual code to compare to my answer. anyone of you could help me? its just an example and part of my studying the "nested loops".
  3. im sorry mates i gave a wrong output, let's change it to this 0+ -2 4+ -4 8+ -6 12+ -8 create a loop that will increment by two and another loop that will increment by four, use for loop. please help me with this example. thanks mates.
  4. @Hartley San, yes that is exactly. could you please help me to code it? im doing it in for loops but with no success. thanks mate.
  5. helo i'm doing my logical exercises and i'm getting hard to solve this output using for loops 2 1 4 3 6 6 8 9 i need your help could you please post your codes? i need to understand nested loops.
  6. ooh my friend tells me about the compatibility of jquery in ie browser and i dont know that you can do that using javascript. i should probably consider larry's modern javascript book. thanks hartleysan
  7. ah so kind of saying that once you are learning ajax you also learning jquery? am i right?
  8. hi sir before considering this book i have one question. have you also covered jquery, ajax here? i mean discussed it in clear? or just focusing on javascript? i'm sorry for this question but i'm completely new to this language. I have browsed the net and some forums giving me advice to learn jquery and ajax. so i am wondering if you discussed it clearly too in this book. many thanks sir example like topics in making modal form in jquery something like that.
  9. hey folks im wondering if jquery is the same as ajax? any answer to that?
  10. how about handling multiple submit buttons in php? I have come across scripts that use: isset($_POST['submit']) as well as code that uses: $_SERVER['REQUEST_METHOD']=='POST' which is better to use? my situation is having two submit button in one php script. since that i cant use the 2nd one in verifying what form is being submitted should this be mean the first one is better?
  11. i'm currently confused on how to resized an image without losing its quality. for example i have 1920x1080 picture and i resized it to 400x225 i am bit satisfy as it succeeded but the things is that, the picture losed its resolution. my formula is here: new height = (original height/original width) * new width and vice versa. while maintaining the aspect ratio i noticed that the resolution degrades and get pixelated. any advice sir?
  12. larry's code in chapter 13 in section under edit. it works perfectly even i dont change the retrieved information at all. my concern is in chapter 12 it cannot done the same. it seems like there is something on larry's chapter'12 code an error? but if i edit it it works perfectly. argh! i'm stuck! in chapter 12.
  13. is there someone there tried not to change the retrieved title and entry and hit update button and get an error? when i run the code and did some changes it goes perfectly but when i did not make any change to the retrieved title and entry it says an error. the thing is that when i make some changes it works but when i choose not to make any changes and hit "update this entry" it says an error. isn't that the problem is you have too make an actual change? what i mean is that once i click edit i should change it atleast one letter or put space so i can update it? what if i decided not to change anything and click update?
  14. thanks for the reply guys especially to you Antonio Conte. you gave me an idea and i'll research on that.
  15. yeah i have red this before and its really good ,it taught me alot about php and mysql and now i am looking forward to take it to more advance. my very concern here is how will you connect the same database you use in programming application. for example you are programming visual basic and you use mysql as its database how will you connect that database to also use in php web developing. what i mean here is that the database is in your local computer and i want my www.example.com to fetch all informations inputted in my local computer at my home. how can i do that?
  16. hey sir i'm thinking of developing an application with mysql as it's database, i'm wondering if how can i connect that database to my php website? for example i am inputting data on my application (that's on my computer) and saved it. and latter on i want that information to be present on my website too. just like one computer application and a web application sharing at one database. so my question is, have you discussed this on your books? any advice regarding to this topic sir? thank you.
  17. hi sir hi sir i am having a problem. the activation message which i received in my thunder bird is successful however when i click the generated link "http://www.example.c...29aa192acc379b7" it forwards me to the this site "http://www.iana.org/domains/example/" even though in my script i wrote this "$body .= BASE_URL . 'activate.php?x=' . urlencode($e) . "&y=$a";" what might be the problem? if i cant fix it i think i cant make to it next topic because i cant activate the account created and cant login.
  18. i got it i just mispelled posts to post hooh problem was resolved! but i was still in the error of no showing the dates under "posted on" and "latest reply" what steps should i do to resolve this? i even tried copy paste the timezone ,the one i downloaded in mysql site, in this address "c:\wamp\bin\mysql" what was wrong then?
  19. <?php # Script 17.7 - post.php // This page handles the message post. // It also displays the form if creating a new thread. include ('includes/header.html'); if ($_SERVER['REQUEST_METHOD'] == 'POST') { // Handle the form. // Language ID is in the session. // Validate thread ID ($tid), which may not be present: if (isset($_POST['tid']) && filter_var($_POST['tid'], FILTER_VALIDATE_INT, array('min_range' => 1)) ) { $tid = $_POST['tid']; } else { $tid = FALSE; } // If there's no thread ID, a subject must be provided: if (!$tid && empty($_POST['subject'])) { $subject = FALSE; echo '<p>Please enter a subject for this post.</p>'; } elseif (!$tid && !empty($_POST['subject'])) { $subject = htmlspecialchars(strip_tags($_POST['subject'])); } else { // Thread ID, no need for subject. $subject = TRUE; } // Validate the body: if (!empty($_POST['body'])) { $body = htmlentities($_POST['body']); } else { $body = FALSE; echo '<p>Please enter a body for this post.</p>'; } if ($subject && $body) { // OK! // Add the message to the database... if (!$tid) { // Create a new thread. $q = "INSERT INTO threads (lang_id, user_id, subject) VALUES ({$_SESSION['lid']}, {$_SESSION['user_id']}, '" . mysqli_real_escape_string($dbc, $subject) . "')"; $r = mysqli_query($dbc, $q); if (mysqli_affected_rows($dbc) == 1) { $tid = mysqli_insert_id($dbc); } else { echo '<p>Your post could not be handled due to a system error.</p>'; "this is the result when i tried to submit it what might be the problem?" } } // No $tid. if ($tid) { // Add this to the replies table: $q = "INSERT INTO posts (thread_id, user_id, message, posted_on) VALUES ($tid, {$_SESSION['user_id']}, '" . mysqli_real_escape_string($dbc, $body) . "', UTC_TIMESTAMP())"; $r = mysqli_query($dbc, $q); if (mysqli_affected_rows($dbc) == 1) { echo '<p>Your post has been entered.</p>'; } else { echo '<p>Your post could not be handled due to a system error.</p>'; } } // Valid $tid. } else { // Include the form: include ('includes/post_form.php'); } } else { // Display the form: include ('includes/post_form.php'); } include ('includes/footer.html'); ?>
  20. hey sir i just got a little problem here, when im trying to post the message, although it runs smoothly, it prompts " Your post could not be handled due to a system error.". that happens when i am creating a new thread, it seems like the queries dont work? any idea about that sir? and also for the remedy?
  21. hey sir i have a question why is it necessary to use return value in a function instead of using echo or print?
×
×
  • Create New...