PHP - MySQL

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

  1. » Marius
    Hello,
    I try to create and use a class object instance and its method inside a function.
    For example I have the following code, but it not works:...
    Last post » Admin
    Hello,
    Pass to the function the arguments needed for class.
    You can use one of the following examples:
    1.
    class clsTest {
    protected $prop ='';...


  2. » JanMolendijk
    I want to update my notice-board into two column, but i searching for day`s how to complete this...
    How can i split this SQL code into two columns...
    Last post » Admin
    Try to put the each notice in Div:
    $sql=mysqli_query($conn, SELECT * FROM `notice_second` ORDER BY `notice_second`.`notice_id` DESC LIMIT 16 );...


  3. » JanMolendijk
    I've been searching for days now, for a script which automatically scans text from a databasek; in a text field.
    For example if i type a name in a...
    Last post » JanMolendijk
    Dear Admin thank you for your support.
    if I have found something succesfully, I will let it known here, so other visitors don`t have to search for...


  4. » JanMolendijk
    I`m using XAMP server + your script Update - Delete Data Using PHP

    I have a checkbox but it does not stay checked
    or unchecked after refreshing...
    Last post » Admin
    You can put in session the status of that checkbox when form is submited, then use it from session.
    <?php
    if(isset($_REQUEST )){
    $_SESSION =...


  5. » JanMolendijk
    Dear ADmin i hope you can help me with my next problem

    I have for the members seperated folders for pictures...
    But some members have to mutch...
    Last post » JanMolendijk
    Thanks for all support again &nd again


  6. » 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...
    Last post » JanMolendijk
    Well i searching in dutch lang & now i found them all
    But still thanks for supporting :)

    <?php
    $waarde1 = $row ;
    $waarde2 = $row1 ;...


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


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


  9. » 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 . '...


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


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


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


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


  14. » 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:


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


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


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


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


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


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


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


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


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


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


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