• Member Avatar for broj1
    broj1

    Replied To a Post in "$row = mysqli_fetch_array($result); not working"

    Now, there might also be a problem in the password field definition in the table spec: `password varchar(20) NOT NULL`. As far as I remember the good old MD5 produces …
  • Member Avatar for broj1
    broj1

    Began Watching "$row = mysqli_fetch_array($result); not working"

    <?php if (isset($_POST['submit'])) { session_start(); include('connection.php'); $email = mysqli_real_escape_string($conn, $_POST['email']); $password = mysqli_real_escape_string($conn, $_POST['password']); $hash_password = md5($password); $sql = "SELECT * FROM users WHERE email = '$email' AND password = …
  • Member Avatar for broj1
    broj1

    Replied To a Post in SQL prepare statement error

    If you intend to use quotes arround field and table names in Mysql you must use backticks, not single or double quotes. However they are not required if table and …
  • Member Avatar for broj1
    broj1

    Began Watching SQL prepare statement error

    I have Apache2, php 7.2, and mysql installed. At the top of my index.php I have the following script: <?php session_start(); // start of script every time. // setup a …
  • Member Avatar for broj1
    broj1

    Replied To a Post in Executing a python script through Php button

    Not sure what exactly is the expected workflow but few notes anyway: The PHP code in the beginning of the test.php should probably only execute after form submission or when …
  • Member Avatar for broj1
    broj1

    Began Watching Executing a python script through Php button

    I am making a webpage wherein I am going to ask for an input through an html form using php, and then call a python script after clicking "submit (flames)" …
  • Member Avatar for broj1
    broj1

    Replied To a Post in Search query from multiple radio button MySQL in

    Quite many issues here: The following code is not valid: $valueToSearch = $_POST['requirementtype' 'build' ]; You can not have two strings as an array index. They should be separated in …
  • Member Avatar for broj1
    broj1

    Began Watching Search query from multiple radio button MySQL in

    #Anyone can help? Here is two search by radio button one is requirement type and another radio button is build. I want to search by requirement type or build but …
  • Member Avatar for broj1
    broj1

    Replied To a Post in Display and hide div based on if statement

    In first version you are missing the other condition ($_SESSION['iiio'] != "pending"). In that case the div is shown by default. It looks like you are using Bootstrap so you …
  • Member Avatar for broj1
    broj1

    Began Watching Display and hide div based on if statement

    Hi Guys. I'm having a serious problem that is holding me back. I have a file which is a user dashboard and this file gets data from another php script …
  • Member Avatar for broj1
    broj1

    Replied To a Post in Help needed to properly display data from MySQL tables

    And do the same for your form fields since it seems that this is the cause of most of the above problems.
  • Member Avatar for broj1
    broj1

    Replied To a Post in Help needed to properly display data from MySQL tables

    The ID that appear in the URL depends on the field names of the form that sends the data. A field in your form probably has a name attribute that …
  • Member Avatar for broj1
    broj1

    Began Watching Help needed to properly display data from MySQL tables

    I'm trying to create an online learning courseware and connecting to MySQL database via PDO. What I'm trying to achieve is: if a user is logged in after registering for …
  • Member Avatar for broj1
    broj1

    Replied To a Post in login to own custom profile group

    You should do it in a similar fashion. I presume the information about the gender is stored in a database for each user. When they login you read this information …
  • Member Avatar for broj1
    broj1

    Began Watching login to own custom profile group

    Hi i have several user types i.e female, male couple etc and when they register each group goes to there own page for profile setup but when they login they …
  • Member Avatar for broj1
    broj1

    Began Watching PHP Url Varible Help Required

    I have a url that contains variables - For Example: reset/password.php?var1=12345&?var2=abcde I would like to know how I can remove (hide) the variables from the url, So no one knows …
  • Member Avatar for broj1
    broj1

    Replied To a Post in PHP Url Varible Help Required

    You can get the variables out of sight by using POST method in your form or call instead of GET which you are using in above example. If you use …
  • Member Avatar for broj1
    broj1

    Replied To a Post in Adding and subtracting from a table with java script.

    EDIT: I noticed after posting that the javascript functions are meant to be in a separate JS file. Disregard my 1. remark, sorry. Had a quick look at the code …
  • Member Avatar for broj1
    broj1

    Began Watching Adding and subtracting from a table with java script.

    The following code will allow me to add a table row line and I can add the starting amount with the first amount input into the first row, but if …
  • Member Avatar for broj1
    broj1

    Replied To a Post in $_SESSION() issue

    You can also check how the query gets constructed, using similar technique as described above by cereal. Just add this between line 2 and 3: die($query); This will print out …
  • Member Avatar for broj1
    broj1

    Began Watching $_SESSION() issue

    Sir I am using these codes on login.php session_start(); $query="select * from w_log where email ='".$muser."' and pass='".$mypass."'"; $result=sqlsrv_query($con,$query)or die ("Error". sqlsrv_errors($con)) ; while($res = sqlsrv_fetch_array($result)) { $_SESSION['id']=($res['id']); $_SESSION['sno']=($res['usno']); $_SESSION['user']=($res['name']); …
  • Member Avatar for broj1
    broj1

    Replied To a Post in PHP retrieve data from table row and store to variable

    If you have a fixed number of variables (known in advance and equal to the lenght of the `$row`) you could use the [list](http://php.net/manual/en/function.list.php) function. Something like: list($a, $b, $c, …
  • Member Avatar for broj1
    broj1

    Began Watching PHP retrieve data from table row and store to variable

    TABLE_ROWS 13 1 8 5 2 3 5 2 7 6 3 4 3 32 my select query results a table like this .Here i want to assign each item …
  • Member Avatar for broj1
    broj1

    Gave Reputation to diafol in Php datetime calculation

    Unfortunately %H will only supply the "remainder" of hours after days taken off. Possibly: function makeMyTime($start, $end){ $dstart = new DateTime($start); $dend = new DateTime($end); $dayHours = $dstart->diff($dend)->format('%a') * 24; …
  • Member Avatar for broj1
    broj1

    Replied To a Post in Php datetime calculation

    You can not subtract two strings representing dates on line 4 and expect to get a difference. Besides the variables on line 4 have not been declared anywhere (but I …
  • Member Avatar for broj1
    broj1

    Began Watching Php datetime calculation

    Sir I have these codes $start_time=$row['start']; //2017-02-09 15:04:09.000 $stop_time=date('Y-m-d H:i:s'); //2017-02-09 16:24:22.000 $duration=$start-$starttime; // it says 2016 but i need result like this //0001:20:13 I mean I need hours in …
  • Member Avatar for broj1
    broj1

    Replied To a Post in Php error library mgmt system help

    Looking at your code the new_entries table is in another database (`newentries`). Is that what you really wanted to do? You are duplicating rows (althoug in another database) so maybe …
  • Member Avatar for broj1
    broj1

    Began Watching Php error library mgmt system help

    HI Dani, I am working on a dissertation project, based on a library management systems. There are a number of features as admin, that needs to operate, which are as …
  • Member Avatar for broj1
    broj1

    Replied To a Post in php dynamic radio button generation and insertion into mysql db

    Quite many issues here, some big, some smaller. I'll try to comment on some without any particular order of importance. 1. On line 9 you try to concatenate some unknown …
  • Member Avatar for broj1
    broj1

    Began Watching php dynamic radio button generation and insertion into mysql db

    i need help in the following code i am trying to create dynamic radio buttons from mysql db and want to insert into another table its not echoing data and …
  • Member Avatar for broj1
    broj1

    Replied To a Post in Investment Calculator

    I tried your code and the table gets generated OK. I get this: Age Beg Bal Interest Deposits Ending Bal 45.00 2000.00 324.65 1200.00 3524.65 46.00 3524.65 521.09 1200.00 5245.75 …
  • Member Avatar for broj1
    broj1

    Began Watching Investment Calculator

    I have this code and need to have it on a table but the table is not creating. What am I doing wrong? <!DOCTYPE html> <html> <body> <script> var investment …
  • Member Avatar for broj1
    broj1

    Replied To a Post in PHP Excel Download with Dynamic Headings in EXCEL

    Use [PHPExcel](https://github.com/PHPOffice/PHPExcel) to create Excel file from the data you read from the database. Dynamic headers are just headers that contain text and formulae in them (the header changes if …
  • Member Avatar for broj1
    broj1

    Began Watching PHP Excel Download with Dynamic Headings in EXCEL

    Hi, I am new to this concept. How to export data from database in EXCEL for various standards with "dynamic headings" .
  • Member Avatar for broj1
    broj1

    Replied To a Post in update database with image with random name

    If this is a guide how to do something it has serious issues: * POST variables are not being sanitized so arbitrary code can be injected * An old and …
  • Member Avatar for broj1
    broj1

    Began Watching update database with image with random name

    include("conn.php"); $studid=$_POST['studid']; $reg=$_POST['reg']; $sname=$_POST['sname']; $fname=$_POST['fname']; $dob=$_POST['dob']; $course=$_POST['course']; $contact=$_POST['contact']; $address=$_POST['address']; $img=$_POST['img']; //Image Upload $name=time(); $uploaddir = "../img/"; $uploadfile = $uploaddir .$name. basename($_FILES['userfile']['name']); move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile); $fpath=$_FILES['userfile']['name']; if($fpath=="") { $fpath=$img; } if($img=="") { …
  • Member Avatar for broj1
    broj1

    Replied To a Post in Checkbox to trigger an email

    Sure. Often a good approach is to break complex tasks into simpler problems and solve each one separately. Anyway, when you bump into problems come here for help :-)
  • Member Avatar for broj1
    broj1

    Replied To a Post in Checkbox to trigger an email

    This code already uses jquery (so do not forget to include it). This is the simplest possible version. In reality it will be more complex. But that depends on what …
  • Member Avatar for broj1
    broj1

    Replied To a Post in Checkbox to trigger an email

    Yes, this is where Ajax comes in. But I do not find those two triggers ("Emailed Customer" and "Email Mitch") in your code snippets. Where are they? But the simplest …
  • Member Avatar for broj1
    broj1

    Replied To a Post in Checkbox to trigger an email

    I tested your code and checkboxes work OK. So if you check the `Equipment Required?` checkbox , both `Ordered?` and `Config?` checkboxes get checked. If you check either of the …
  • Member Avatar for broj1
    broj1

    Replied To a Post in Checkbox to trigger an email

    Ajax is actually an approach or a concept where you use existing technologies. The main advantage is that you do not reload the page when you do a new HTTP …
  • Member Avatar for broj1
    broj1

    Began Watching Checkbox to trigger an email

    Hey guys, I am trying to figure out a few things right now. 1. Is it possible to do a nested checkbox where there is the main checkbox and then …
  • Member Avatar for broj1
    broj1

    Replied To a Post in Checkbox to trigger an email

    > Is it possible to do a nested checkbox It is, but you will have to code. Use Javascript or even better jQuery to listen to the click event and …
  • Member Avatar for broj1
    broj1

    Gave Reputation to diafol in Common Issues with MySQL and PHP

    ## Contents ## Overview 1. Alternatives to Deprecated mysql_* Functions 2. SQL Injection: What to do with $_POST and $_GET variables 3. How to Insert Tablenames and Fieldnames Properly 4. …
  • Member Avatar for broj1
    broj1

    Began Watching How can I create multiple page of grid or table

    in my database I have table called memory and it have images , description and title I want to display the image like how online shop display their products (eg: …
  • Member Avatar for broj1
    broj1

    Replied To a Post in How can I create multiple page of grid or table

    Displaying images in a grid is probably better since your page will be displayed nicely on mobile devices - provided that your grid is set-up properly. You can use a …
  • Member Avatar for broj1
    broj1

    Began Watching How to secure users image on server

    my web application is really simple there are two buttons one called "save" and the other called "show my images" basically the user can save images from facebook API and …
  • Member Avatar for broj1
    broj1

    Replied To a Post in How to secure users image on server

    If you want to prevent unauthorised users from displaying the iamges you can encrypt them using [mcrypt_encrypt](http://php.net/manual/en/function.mcrypt-encrypt.php). But be aware that you have to deal with key management to be …
  • Member Avatar for broj1
    broj1

    Began Watching Hiding divs in old versions of IE

    I've got a new navigation layout I'm trying to implement at this url: http://www.50allstars.com/2016/05/grid-menu.html?m=1 It's not all done yet, but in my tests I've found this page to not work …
  • Member Avatar for broj1
    broj1

    Replied To a Post in Hiding divs in old versions of IE

    I can't test the code since I am on Linux and using Firefox and Chrome. However my recommendation is that you use [jquery](http://jquery.com/) functions in your javascript code since jquery …

The End.