Jump to content

Wolphie

Members
  • Posts

    682
  • Joined

  • Last visited

    Never

Everything posted by Wolphie

  1. Are you trying to pull an MD5 encrypted string from a database and echo a decrypted password? (Like the original password)
  2. Wolphie

    php mail

    Download something named XAMPP from apachefriends.org They have a built in mail server
  3. I had this same problem when using headers with sessions. Try removing session_start(); then trying the re-direct on it's own
  4. Wolphie

    php mail

    In order to be able to send mail locally you need to have a mail server installed on the local machine.
  5. 1KB = 1024 1MB = 1024 / 1024 Therefore, do something like <?php function fileSize() { $filesize = $_FILES['file']['size']; $filesize = $filesize / (1024 / 1024); $filesize = floor($filesize); if($filesize >= 5) { echo 'Your file is larger than 5MB'; } else { echo 'Your filesize is below 5MB'; } } ?> Try that even
  6. 1KB = 1024 1MB = 1024 / 1024 Therefore, do something like <?php function fileSize() { $filesize = $_FILES['file']['size']; $filesize = $filesize / (1024 / 1024); if($filesize >= 5) { echo 'Your file is larger than 5MB'; } else { echo 'Your filesize is below 5MB'; } } ?>
  7. Ah i see where i went wrong now. Thanks for that
  8. I'm having trouble with the following snippet of code, i'm pretty certain it's to do with the regex strings. The javascript: <script language="javascript"> function checkColor() { var selectBox = document.getElementById('effects'); var user_input = selectBox.options[selectBox.selectedIndex].value; var str = user_input; if((str.match(/color/i)) || (str.match(/all/i))) { document.getElementById('divColor').style.display = 'block'; } else { document.getElementById('divColor').style.display = 'none'; } } </script> The Select Box: <select id="effects" name="effects" style="width: 147px;" onchange="return checkColor();"> <option value="1">Standard ($1.00)</option> <option value="2">Bold ($1.25)</option> <option value="3">Color ($1.25)</option> <option value="4">Underlined ($1.25)</option> <option value="5">Bold & Colored ($1.50)</option> <option value="6">Underlined & Colored ($1.50)</option> <option value="7">Bold & Underlined ($1.50)</option> <option value="8">All ($1.75)</option> </select>
  9. Are you sure it's nothing actually to do with the domain? Usually it's the domain.
  10. Our pleasure, please remember to click "Topic Solved"
  11. Yeah, that's what i thought however i wasn't sure. Thanks for the clarification.
  12. Try removing page_url from the query and try just a single field.
  13. <?php $con = mysql_connect('databasename', 'password', 'username'); mysql_select_db('site_info', $con); if(!isset($_POST['submit'])) { echo ' <form action="' . $_SERVER['PHP_SELF'] . '" method="post"> <center><input type="text" name="search" /><input type="submit" value="Search" name="submit" /></center> </form>'; } else { $query = "SELECT * FROM `site_info` WHERE `page_url`, `page_name` LIKE '%" . $_POST['search'] . "%'"; $result = mysql_query($query, $con) or die('Error: ' . mysql_error()); // Always use error handling while($row = mysql_fetch_array($result)) { echo ' <tr> <td><a href="' . $row['page_url'] . '">' . $row['page_name'] . '</a></td> </tr> </table>'; } } ?> Try that WITHOUT changing a thing, then copy and paste the error here.
  14. <?php $con = mysql_connect('databasename', 'password', 'username'); mysql_select_db('site_info', $con); if(!isset($_POST['submit'])) { echo ' <form action="' . $_SERVER['PHP_SELF'] . '" method="post"> <center><input type="text" name="search" /><input type="submit" value="Search" name="submit" /></center> </form>'; } else { $query = "SELECT * FROM `site_info` WHERE `page_url`, `page_name` LIKE '%" . $_POST['search'] . "%'"; $result = mysql_query($query, $con) or die('Error: ' . mysql_error()); // Always use error handling while($row = mysql_fetch_array($result)) { This line 308 for me echo ' <tr> <td><a href="' . $row['page_url'] . '">' . $row['page_name'] . '</a></td> </tr> </table>'; } } ?> I think it may be the brackets. Try that
  15. Sorry typo, i spelled it "names" rather than "name" Use this: <?php $con = mysql_connect('databasename', 'password', 'username'); mysql_select_db('site_info', $con); if(!isset($_POST['submit'])) { echo ' <form action="' . $_SERVER['PHP_SELF'] . '" method="post"> <center><input type="text" name="search" /><input type="submit" value="Search" name="submit" /></center> </form>'; } else { $query = "SELECT * FROM `site_info` WHERE `page_url`, `page_name` LIKE ('%" . $_POST['search'] . "%')"; $result = mysql_query($query, $con) or die('Error: ' . mysql_error()); // Always use error handling while($row = mysql_fetch_array($result)) { This line 308 for me echo ' <tr> <td><a href="' . $row['page_url'] . '">' . $row['page_name'] . '</a></td> </tr> </table>'; } } ?>
  16. Only have a reply link on the parent comment
  17. I don't think it's possible to encrypt source code. The best way to do what your asking is to generate a dynamic and unique encrypted string for each Payment.
  18. Oops that's wrong <?php $con = mysql_connect('databasename', 'password', 'username'); mysql_select_db('site_info', $con); if(!isset($_POST['submit'])) { echo ' <form action="' . $_SERVER['PHP_SELF'] . '" method="post"> <center><input type="text" name="search" /><input type="submit" value="Search" name="submit" /></center> </form>'; } else { $query = "SELECT * FROM `site_info` WHERE `page_url`, `page_names` LIKE ('%" . $_POST['search'] . "%')"; $result = mysql_query($query, $con) or die('Error: ' . mysql_error()); // Always use error handling while($row = mysql_fetch_array($result)) { This line 308 for me echo ' <tr> <td><a href="' . $row['page_url'] . '">' . $row['page_name'] . '</a></td> </tr> </table>'; } } ?>
  19. Try this <?php $con = mysql_connect('databasename', 'password', 'username'); mysql_select_db('site_info', $con); $query = "SELECT * FROM `site_info` WHERE `page_url`, `page_names` LIKE ('%" . $_POST['search'] . "%')"; $result = mysql_query($query, $con) or die('Error: ' . mysql_error()); // Always use error handling while($row = mysql_fetch_array($result)) { This line 308 for me echo ' <tr> <td><a href="' . $row['page_url'] . '">' . $row['page_name'] . '</a></td> </tr> </table>'; } if(isset($_POST['submit'])) { echo ' <form action="' . $_SERVER['PHP_SELF'] . '" method="post"> <center><input type="text" name="search" /><input type="submit" value="Search" name="submit" /></center> </form>'; } ?>
  20. It wouldn't be too hard to re-use the register form. But instead of using the INSERT statement, you'd use UPDATE
  21. Then it's more of a library rather than OOP.
  22. Classes can be tricky if you haven't used them that often. Classes are usually used in OOP
  23. Cart is a class And add_item is a function within that class So basically you're accessing the class Cart in order to use the function
×
×
  • 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.