Jump to content

CroNiX

Staff Alumni
  • Posts

    1,469
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by CroNiX

  1. This jQuery will probably work, but only on browsers that don't block popups. There is no guarantee any link with _blank will open a new tab. It depends on the individual users browser settings. $('div.work-item').on('click', function() { window.open($(this).data('url'), '_blank'); });
  2. CroNiX

    PHP XML

    It's namespaced, so you need to use getElementsByTagNameNS() http://php.net/manual/en/domdocument.getelementsbytagnamens.php
  3. I appreciate you saying that. Most people just take the help and don't post again once they have it working.
  4. while ($row=mysql_fetch_array($res)) { ?> //You are terminating php here, but using php on next line echo "<tr>"; So the very last ?> in the file doesn't have a matching open php tag...just 2 php close tags.
  5. What changed that it started working? As far as order by pr_live first, you need to tell it to. ORDER BY pr_live ASC, pr_street ASC So that will first order by pr_live, and then any pr_live columns that have the same value it will order it by pr_street. Something like: pr_live = 1, street = 123 some street pr_live = 1, street = 234 some other street pr_live = 2, street = 123 some street pr_live = 2, street = 456 another street
  6. I'm sorry, I still don't see why it wouldn't. I'm assuming your query is running or you wouldn't get any results, but you should still check for an error. $result = mysqli_query($db,$query); if ( ! $result) { printf("Error: %s\n", mysqli_error($db)); } Obviously you wouldn't just want to dump the error to the screen on a live site as that tells the average user nothing, but can be quite helpful to malicious users by exposing db info.
  7. Well, you didn't incorporate the code changes I mentioned, so your error output is wrong and misleading you. The values you are comparing are NOT actually ozzy2004 and ozzy2004. That's impossible if you are using MD5().
  8. Are the passwords actually stored as a md5() hash in the database, or is it a plaintext password?
  9. You're all over the place... First you get $current_stored_password from a db query: $current_stored_password = $row['password']; Then you compare md5(password) to $current_stored_password, but when you echo the error you don't include the md5(password) value, you echo just the original password, and you also use the value from $_POST instead of $current_stored_password. So in your error output, you are not seeing exactly what you are comparing... Try something like: $current_password = md5($current_password); if($current_password != $current_stored_password) { echo var_dump($current_password) . ' AND ' . var_dump($current_stored_password) . ' Password and password again do not match'; }
  10. Can they only access the picture gallery after logging in? If so just have session_start() at the top of the gallery script and access $_SESSION['MM_Username'] like you are in the above script.
  11. I don't see why it wouldn't, but since you are joining on another table it's generally a good idea to add the table name to selects, where's, order by's etc., just like you are in the actual join ORDER BY property.pr_street ASC If both tables had a field named pr_street, there would be errors. You've also probably altered your code quite a bit, so it would be helpful to see the current code.
  12. CroNiX

    case help

    format(SUM(i.price + i.p_and_p), 2) as AS `total_price`
  13. It's probably these lines: $query = "SELECT * FROM property LEFT OUTER JOIN pr_imgs ON property.pr_id = pr_imgs.pr_id AND pr_imgs.pr_img_count = '0' ORDER BY pr_street ASC"; $result = mysqli_query($db,$pr_sel_query); $pr_sel_query should probably just be $query.
  14. If your js file ONLY contains function display(){ alert("this is text"); } Then yeah, it does nothing because nothing calls "display()" function. It's just a defined function. To test it, try adding display(); after the function declaration so the function gets called, or just type "display()" in the js console.
  15. That generally indicates a fatal error, but you don't have display_errors enabled. Enable it at the top of your script or check the php error log for the reason assuming you have error logging enabled. This should be done for any script you are developing, but have them disabled on the production site.
  16. <?php echo '<h2>Customer Appointments</h2>'; ?> No need for php there...
  17. "errors out"... Can you be more specific? What is the exact error?
  18. libcurl is the OS/Debian curl package, you need to install and enable the PHP curl library in your php.ini and reboot the web server. I think debian calls it "php5-curl". You can see if it's enabled via phpinfo();
  19. Server side javascript? Are you using node.js or something?
  20. please wrap your code in [ code][ /code] (remove spaces) tags so it's more readable by humans.
  21. It shows the js. Look at where it says "Installation" The first js code block shows loading bootstrap and the validation library The 2nd js codeblock shows assigning it to the html elements
  22. Probably the easiest would be to: $email_acct = array_pop(explode('@', $email));
  23. The only way would be to request the footer using AJAX after you get the width using JS. The php code on the server knows nothing about your javascript, which runs in the browser, AFTER php has stopped processing and sent the data to the browser.
  24. You need to check if it is isset() BEFORE you try assigning it to a variable.
×
×
  • 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.