PHP - MySQL

Discuss coding issues, and scripts related to PHP and MySQL.
  1. Counting 3 0

    » JanMolendijk
    Chef i`m back hoping you could help me with this
    i think i need just one example then i can build
    a score-board for the members...

    I have two...


  2. » JanMolendijk
    How can i create that this code is only visible for friends-list ?
    <?php
    include('connection.php');

    $id = (int) $_GET ;...
    Last post » JanMolendijk
    This where realy helpfull thanks for your support


  3. » JanMolendijk
    I have a friend-system that works with a database
    I need from another table the user-id (id), so i can link to their profile

    table: my_friends...
    Last post » Admin
    The tables must have some relation between each other, to can make what you want.
    The relation can be on id or other fields.
    The idea is to have...


  4. » JanMolendijk
    I run your Website Mini-Traffic and Pages Access data:

    From my mebers page Users.php i don`t get an title from database.
    I added simple an...
    Last post » Admin
    Hello,
    Add the php variable into <?php .. ?> , with echo .
    Try this:
    $sql=mysqli_query($conn, SELECT * FROM `user` WHERE id=' . $id . '...


  5. » JanMolendijk
    Dear Chef i`m back again, i try to do alot to get smarter...
    This to make the website better but it is complicated
    also my technical-english is not...
    Last post » JanMolendijk
    Thank you so mutch it is settlet now


  6. » mlucicom
    I have a php page where i work with session..
    <?php
    session_start();
    if (isset($_SESSION )) {
    $username2=$_SESSION ;
    } else {
    echo <script...
    Last post » Admin
    Hello,
    That error appears because there is something sent to browser before session_start(); , like an echo , or a space or other character before...


  7. » JanMolendijk
    Into this code i see 30 records.
    Now i wanna add a link to eatch single record.
    i can do this with: >'. $row .'
    but how do i create a singel...
    Last post » Admin
    If there is a notice_id ; in that mysql table, you can store it in a variable, then apply echo to that variable.
    while($row =...


  8. » beegee
    Just so you know in some php files from your scripts you left out the closing ?> .
    I put it in and looks good thank you.
    Last post » Admin
    In php files, if after the last line of code there isn't other content, like html, there is not need for the closing tag ?> .
    The closing tag is...


  9. » JanMolendijk
    What i miss for my users is an page-counter.
    Now i hope you have someting for me.
    Something like on eatch different id.
    Last post » Admin
    Hello,
    I have this php script for page counter and monitoring website traffic:


  10. » JanMolendijk
    Dear Admin i hope you can help me out...

    I have a list off latest comments but some text are to long & i would like to show only the first 10...
    Last post » JanMolendijk
    Thank you so Mutch for Suporting dear Admin
    You really deserve a donation


  11. » 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() in...
    Last post » JanMolendijk
    I gave up & gonna use your comment-tree script
    thanks for all the support


  12. » 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
    $dbh =...


  13. » 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...
    Last post » Admin
    You have to change all mysql_ functions that get and parse data from database with their mysqli correspondent.


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

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

    if (is_array($_POST )) {
    $media_array2 = $_POST ;...
    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 defined....


  15. » mlucicom
    I have some select options:
    <select name= array[] value= a >First</select>
    <select name= array[] value= ab >First2</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...


  16. » 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 ?
    if(isset($_POST...
    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...


  17. » 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...


  18. » 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


  19. » 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 = ... GROUP_CONCAT(area.id...


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

    // Interogare sql SELECT
    $sql = SELECT `location`.`id` , `location`.`location` , `location`.`customer` ,...
    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 t1, table2 AS t2 ;...


  21. » 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...
    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...


  22. » 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,...


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


  24. » 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...


  25. » 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 the...