Jump to content

cyberRobot

Moderators
  • Posts

    3,145
  • Joined

  • Last visited

  • Days Won

    37

Everything posted by cyberRobot

  1. Ah...the function calls are backwards. Try var_dump(substr(strrchr($image,'/'),1)); Sorry, not backwards. You were calling strrchr() twice.
  2. If you want to use a variable, it can't be in a single-quoted string. Try var_dump(strrchr(strrchr($image,'/'),1));
  3. @gw32 - when you call mysqli_query, as suggested by Barand, you'll need to store the result set identifier. That identifier needs to be passed to mysqli_fetch_array() in the following line of code: while($row = mysqli_fetch_array($query)) { More information can be found here: http://php.net/manual/en/mysqli-result.fetch-array.php
  4. Also note that you still have quite a few syntax errors in the following while loop: while($row = mysqli_fetch_array($query)) { echo "<tr> <td><font color='white'></td> <td><font color='white'>.$row['tpts'].</td> <td><font color='white'>.$row['name'].</td> <td><font color='white'>.$row['winning'].</td> <td><font color='white'>.$row['high'].</td> <td><font color='white'>.$row['fty'].</td> <td><font color='white'>.$row['total'].</td> <td><font color='white'>.$row['weeks']?></td> <td><font color='white'>.$row['t7'].</td> <td><font color='white'>.$row['pt7'].</td> <td><font color='white'>.$row['wl'].</td> </tr>"; } It should look more like this: while($row = mysqli_fetch_array($query)) { echo "<tr> <td><font color='white'></td> <td><font color='white'>" . $row['tpts'] . "</td> <td><font color='white'>" . $row['name'] . "</td> <td><font color='white'>" . $row['winning'] . "</td> <td><font color='white'>" . $row['high'] . "</td> <td><font color='white'>" . $row['fty'] . "</td> <td><font color='white'>" . $row['total'] . "</td> <td><font color='white'>" . $row['weeks'] . "</td> <td><font color='white'>" . $row['t7'] . "</td> <td><font color='white'>" . $row['pt7'] . "</td> <td><font color='white'>" . $row['wl'] . "</td> </tr>"; }
  5. Based on a quick look, you have some syntax errors in the echo statements here: while($row = mysqli_fetch_array($result)) { echo "<tr>"; echo "<td>" .['tpts']. "</td>"; echo "<td>" .['name']. "</td>"; echo "<td>" "$" .['winning']. "</td>"; echo "<td>" "$" .['high']. "</td>"; echo "<td>" "$" .['fty']. "</td>"; echo "<td>" "$" .['total']. "</td>"; echo "<td>" .['weeks']. "</td>"; echo "<td>" .['t7']. "</td>"; echo "<td>" .['pt7']."%" "</td>"; echo "<td>" "$" .['wl']. "</td>"; echo "</tr>"; }
  6. That depends on your website host.
  7. If you need more information, see the warning on the documentation for mysql_connect(). http://php.net/manual/en/function.mysql-connect.php In short, the mysql_* extension will no longer be available in PHP 7.
  8. You would use the additional_headers argument for mail(). More information can be found here: http://php.net/manual/en/function.mail.php Note that your original code utilized the argument. With that said, you'll want to work on the security aspect of the code, as suggested by Jacques1. Adding a user-supplied address in the email header, for example, opens your script to email injection attacks. More information can be found here: http://securephpwiki.com/index.php/Email_Injection
  9. The name used in your input fields <input class="contact" type="text" name="your_name" value="" /> ...needs to match the text used in your $_POST variables. $field_name = $_POST['cf_name']; For the above field, try the following: $field_name = $_POST['your_name'];
  10. You could try something like this <script> $(document).ready(function($){ //HIDE ALL LISTS $('.mobile-collapse__content:visible').hide(); //PROCESS A TITLE BUTTON CLICK $(".mobile-collapse__title").click(function(e) { e.preventDefault(); if($(this).next('div.mobile-collapse__content').css('display') == 'none') { $('.mobile-collapse__content:visible').hide(); $(this).next('div.mobile-collapse__content').show(); } else { $('.mobile-collapse__content:visible').hide(); } }); }); </script>
  11. Since that doesn't seem like a data table, you could look into using CSS to create an image gallery effect. Perhaps the following article will help: http://alistapart.com/article/practicalcss
  12. Could you clarify what you mean by "make 2 columns"? What type of information are you looking to display in those columns? Note that you can use HTML's <table> tag to add data tables. More information can be found here: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table
  13. Have you looked into giving each of the "timervalue" inputs a different name and id? Side note: the id attribute in HTML is supposed to be unique. More information can be found here: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id
  14. Did you check if there are any MySQL errors? http://php.net/manual/en/function.mysql-error.php At some point, you'll also want to make sure that PHP is showing all errors and warnings during the debugging process. To do that, you can add the following to the top of your script: <?php error_reporting(E_ALL); ini_set('display_errors', 1); ?> And in case you're not aware, you'll want to look into hashing the password. More information can be found here: http://php.net/manual/en/faq.passwords.php
  15. You can try something like this (untested): <?php $query = 'SELECT * FROM cooking_classes WHERE class_id IN (' . implode(', ', array_keys($_SESSION['cart'])) . ')'; $result = mysqli_query($conn, $query) or die(mysqli_error()); ?>
  16. What does your code currently look like? When posting the code, please surround it with tags. It will make your post and code easier to view.
  17. I'm starting to think it's the latter given the following post: http://forums.phpfreaks.com/topic/300872-what-is-web-crawler/
  18. Perhaps the following will help: https://en.wikipedia.org/wiki/Web_crawler
  19. Do you get any errors? For what it's worth, the following works for me. <?php $preisarray = array ( 0 => array ( 'L124900' => array ( 'preisfarbe' => 'katalog', 'preis1' => '29.99', 'menge1' => '1', ), ), 1 => array ( 'LA124900' => array ( 'preisfarbe' => 'katalog', 'preis1' => '29.99', 'menge1' => '1', ), ), ); var_dump($preisarray); print $preisarray[0]["L124900"]["preis1"]; ?> It displays "29.99".
  20. cyberRobot

    Hi :)

    Or, if you want to stick with Dreamweaver, their code view has some useful features. Of course, that assumes you want to write your own code.
  21. For what it's worth, PHP has a function for encoding strings to be used in a URL. More information can be found here: http://php.net/manual/en/function.urlencode.php
  22. Are both of the username fields named the same thing? If so, try using a different name for one of the fields.
  23. Seems fine to me
  24. You could try something like this: $taxonomyOfInterest = array(); $attribute_taxonomies = wc_get_attribute_taxonomies(); if ( $attribute_taxonomies ) : foreach ($attribute_taxonomies as $tax) : $taxonomyOfInterest[] = esc_html(wc_attribute_taxonomy_name($tax->attribute_name)); endforeach; endif;
  25. Perhaps the following will work: http://koen.kivits.com/articles/pure-css-menu/
×
×
  • 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.