PHP - MySQL

Discuss coding issues, and scripts related to PHP and MySQL.

  1. » JanMolendijk
    I changed a php-mysql script to work with MySQLi, and now i getting this error:
    Fatal error: Call to undefined method mysqli::numrows()...
    Last post » JanMolendijk
    I gave up & gonna use your comment-tree script
    thanks for all the support


  2. » JanMolendijk
    I did turn a php script to mysqli but getting two errors:
    Warning: mysqli_select_db() expects exactly 2 parameters, 1 given in...
    Last post » Admin
    Hy,
    Replace the "mysqli_" prefix from the function name with the object that store the connection.
    For example:
    // connect to database...


  3. » JanMolendijk
    Dear admin,

    I have an comment tree but it is deprecated.
    i tried to update the script but i cant gets to many errors.

    Also i searching for months...
    Last post » Admin
    You have to change all mysql_ functions that get and parse data from database with their mysqli correspondent.


  4. » mlucicom
    I have this code
    <?php
    session_start();

    $username2=$_SESSION['username'];
    require('layout.php');

    if...
    Last post » Admin
    The problem is with the script logic. If the $_POST not exists when there is "submit", the variable that takes data from $_POST will not be...


  5. » mlucicom
    I have some select options:
    <select name="array[]" value="a">First</select>
    <select...
    Last post » Admin
    Hello,
    To transfer value from <select> tag to php you need to use <option> elements in <select>, and send data via a form with...


  6. » mlucicom
    Hello! i have a script that insert some details in MySql database but the file upload don't work.Have you any ideea why don't work ?...
    Last post » Admin
    I not know whay it not works, it might be problem from the html form, or the column types in mysql, or variable with data for inserting in mysql is...


  7. » mlucicom
    After a mysql select i want to add data to a div content, but script don't work..can you look above this and give me a suggestion?
    <?php...
    Last post » Admin
    That code not works because there are many double quotes inside string delimited with double-quotes in JS, and new lines in javascript string.
    Pay...


  8. » JanMolendijk
    I`m back again this time with an question for unlink
    i lookt for 6 hours for an solution to delete pictures placed into this code
    <?php
    $files =...
    Last post » JanMolendijk
    thanks for the support it is working


  9. » mlucicom
    Have you any ideea why this sql select return me only one value?
    SELECT `location`.`id` , `location`.`location` , `location`.`customer`...
    Last post » Admin
    I cannot test the code because i not have those mysql tables, but i can advice you to add an alias to GROUP_CONCAT:
    $sql ="......


  10. » mlucicom
    Hi! i have this database select query:

    // Interogare sql SELECT
    $sql = "SELECT `location`.`id` , `location`.`location` ,...
    Last post » Admin
    You can add an Alias to the selected columns (with AS).
    $sql ="SELECT t1.id, t1.name AS namet1, t2.name AS namet2 FROM table1 AS...


  11. » JanMolendijk
    Dear admin i`m back again with an question
    I wanna use your file upload script

    sets maximum file size allowed (in KB). Is it posible to use maximum...
    Last post » Admin
    I not have experience with hosting and server settings; but you can try to change those settings in php.ini and see if it works.
    - After you make and...


  12. » JanMolendijk
    Dear Admin i`m back again with something new...
    How can i show into a php document text from an text-file ?

    i have this code into the text file...
    Last post » Admin
    Hello,
    You can use file_get_contents() to get a string with file data.
    Then, with explode() you can split that string by the separator you want, and...


  13. » chill
    Hi Admin,
    I try to use more than one session field into a single string, it does not work. I have tried:...
    Last post » Admin
    Better put here that part of code.
    Maybe not all those sessions are set.


  14. » melmdoost
    hi,
    i am using a query look like this:
    xxx.com/search.myskils.php?id=157

    this address "xxx.com/search.php" send an id number to...
    Last post » Admin
    In this case you have to make safety the Insert, Update, Delete data in database.
    1. You can add a login admin script that sets a Session with logged...


  15. » JanMolendijk
    Well here i`m again... I wanna use this script

    Now i try with an id (int) into this script

    <?php
    include('connection.php');

    $id = (int)...
    Last post » JanMolendijk
    I got one question i try to ad for the upload more extensions like avi or mp3
    but when i put this i get the error The file: 03.avi not has...


  16. » JanMolendijk
    I have a rating script where new people able to rate from 1 till 5.
    Now i have this simple code what shows the total number of rates:
    <?php...
    Last post » JanMolendijk
    Thank you so mutch Admin great work


  17. » JanMolendijk
    I think i search wrong on google & after few hours i quited.
    My question how do i make a simple calculator in php code like:
    1 + 1
    2 - 1
    2 / 1
    2...
    Last post » Admin
    Hello,
    See the script from this page:


  18. » mlucicom
    Hi Admin!
    I have a php code that select values from database but this return 500 error when i execute

    <!DOCTYPE html>
    <html...
    Last post » Admin
    Hello,
    That problem is not from that script, generally the 500 error is from server problems or from some code in .htaccess file.


  19. » melmdoost
    hello,
    i have a problem with this code:
    if(isset($_POST['submit_login']))
    {
    $txt_login=...
    Last post » melmdoost
    thank you for your help.
    i can find this problem!
    it was a space line in user_password=' $hashed_password' in register code.
    all of the passwords in...


  20. » mlucicom
    Hello,
    have you any ideea how this work in html without <?php ?> tags?
    <div...
    Last post » Admin
    - The form of the code that you posted it can work with a template system, like php Smarty, which must be included and configured in your php...


  21. » mlucicom
    Hello..i have a php social network loveparadyse.com.
    and this is the class for add users to database:

    function query() {...
    Last post » Admin
    If it is inserted 'no_ref' it means that the $_GET is False (not in the address that accesses the file) or its value is deleted by other code in that...


  22. » JanMolendijk
    Dear admin i try for few hours to find out how i can get an id into my code
    <?php for($i = (0); $i<sizeof($i);$i++){ ?>
    - $i = (0); the 0...
    Last post » JanMolendijk
    i tried many things but i get no results


  23. » JanMolendijk
    I`m buissy with an simple upload script, every member have a own folder for pictures on my server.
    Now i try to add a echo variable but getting a...
    Last post » Admin
    Thanks for your intention, but I not need donation.
    I'm thankful with my peace.


  24. » JanMolendijk
    Dear admin i `m thankfully for your support `just great`.
    With both examples for <input type="text"> it shows only string(13) but not...
    Last post » JanMolendijk
    Thank you so mutch stupido me i had to use: <?php echo $ip; ?>


  25. » JanMolendijk
    I wanna add an ip-adress into an notice script.
    This code is working on a hosting server, but not in a script on my XAMPP-home-server
    <? echo...
    Last post » Admin
    I Not know what the problem is.
    What value it is returned by $_SERVER ?
    Try this code to see what exactly it contains:...