PHP - MySQL

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

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


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


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


  4. » 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; ?>


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


  6. » JanMolendijk
    My next problem when i use this code i getting one record from user='anonymous@hotmail.com '
    but i would like to have all the records what is posted...
    Last post » Admin
    Hello,
    You have to use a while() loop to traverse the rows returned in the result set.
    $sql=mysqli_query($conn,"SELECT * FROM `notice` WHERE...


  7. » JanMolendijk
    Daily i have problems with my work today my problem is...

    I try to build a Notification Popup i have for this a script what seems to work
    but when i...
    Last post » JanMolendijk
    Dear admin thanks for the support... But when i add your code i getting the number off all results.
    I have two users... 1 user have one result, the...


  8. » JanMolendijk
    I need your help again i cant find out how to select a specific id to show
    i have this address:...
    Last post » JanMolendijk
    After day working i finaly found it out.
    i added this code:
    $id = (int) $_GET['id'];
    $sql = $conn->query("select * from user where...


  9. » mlucicom
    i have two php files:

    the index.php ---

    <?php
    $id ="3";
    if(!empty($_POST["save"])) {
    $conn =...
    Last post » Admin
    I not know way it not works; maybe data from the resulted sql query is not ok for that mysql table structure.
    If there is no message with errors, try...


  10. » JanMolendijk
    I have this database for my comments
    Now i wanna count the comments from citem
    c66u_nucleus_comment

    Type Collatie Attributen
    1 cnumber int(11)
    2...
    Last post » Admin
    Hello,
    1. This is the syntax that you can use to sum numeric values from a column into a mysql table:
    SELECT SUM(col_name) AS snr FROM table_name...


  11. » JanMolendijk
    Now i have my next problem & can`t find out what i must do to complete.
    I have three mysql tables:
    user
    Type Collatie Attributen Leeg...
    Last post » Admin
    Hello
    Try with this code (see the relations with the IDs between tables):
    $sql = "SELECT A.`user_firstname`, A.`user_lastname`,...


  12. » JanMolendijk
    I looking for a example how to select data from two data-bases

    i have a table group with: group_id, club_id & member_id
    i have a table user...
    Last post » JanMolendijk
    I tried this morning a view thinks & had result just before your posting
    Great support Admin thanks i`m view day`s buissy to find out how tables...


  13. » Ja42la
    Error: Apache shutdown unexpectedly.
    8:59:36 AM [Apache] This may be due to a blocked port, missing dependencies,...
    Last post » Admin
    Hello
    Not sure what the problem is, from what the error message says, it is possible that another application runs on the port set for Apache, or...


  14. » Admin
    - If you want to do multiple COUNT(), in multiple tables, and output them in a single SELECT statement with each COUNT being a column; you can use a...


  15. » melmdoost
    I have a question. it is my last question.
    i use persian name in file name.
    when i upload a file (with persian name) and move it to upload folder,...
    Last post » Admin
    - Or, in the same approach you can encode /decode the file name with base64:
    1. When uploading the file, apply base64_encode() to name (without...


  16. » melmdoost
    Hello.
    i have a script for upload file. this script has a problem with duplicate names, in upload folder. i want rename file name in upload folder. i...
    Last post » Admin
    The character ":" is not allowed in file name; so, you should replace it with "-" or "_" in the string with the time....


  17. » JanMolendijk
    I wanna use this script but make a form field from it were i can add text into the forms INSERT INTO `users`,on:
    Last post » JanMolendijk
    Thanks for the support i had to look better & found the way


  18. » mluci12
    I use mysql Inner join with php for a select from two data tables.But the resuts are duplicated because in one table i have more results with that...
    Last post » Admin
    The group_concat() is not for file, it is a mysql function that returns a string with concatenated non-NULL value from a group of rows (separated by...


  19. » mluci12
    How can i display the selected mysql row into html table cells?
    Last post » Admin
    See the tutorial from:
    - Or search on the net for: " mysql select in html table ".


  20. » Admin
    This php script can be used to print a MySQL table data to HTML table.

    $conn = new mysqli('localhost', 'root', 'password', 'dbname');...


  21. » mluci12
    How can i rename file with current date ( month/years/minute/secondes.file_extension ) in the code from:
    Last post » Admin
    Try to use the code from this example:
    $fname ='file-name.ext';

    $set_name = date('Y-m-d-H-i-s');
    $fname =...


  22. » JanMolendijk
    I have this code to update one from your scripts
    But if i select the option Other it does not stay in de admin on this same line
    I hope you could...
    Last post » JanMolendijk
    Thank you Admin for the support


  23. » JanMolendijk
    I wanna use this code but only a single row, do you known how to select it ?

    // SELECT sql query
    $sql = "SELECT `id`, `name`, `pass` FROM...
    Last post » JanMolendijk
    I found the answer i have to do this
    // SELECT sql query
    $sql = "SELECT `user_longbio`, `user_id` FROM `user` WHERE `user_id`='10000' ";


  24. » JanMolendijk
    I run two different scripts for both i have an log-in system.
    But how can i make an register for two data-bases ?
    Last post » JanMolendijk
    ok thank you for the answer i gonna try some things


  25. » JanMolendijk
    I hope you could help me out with this problem

    <?php
    session_start();
    include_once 'dbconnect.php';

    if(!$mid){
    $query =...
    Last post » Admin
    Hello
    You have to the object with the mysqli connection:
    $query = $conn->query("...");
    //OR:
    $query =...