Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/19/2020 in all areas

  1. Javascript runs on the client, PHP on the server, so you can't incorporate PHP code inside JS. What you can do is submit an AJAX request from JS to the server, process it with PHP and send back the results as a response. In JQuery, look at $.ajax() $.get() $.post() Here's a very basic example <?php if (isset($_GET['ajax'])) { // I like to tell my script it's reciving AJAX $x = $_GET['x'] ?? 0; exit("$x squared is " . ($x**2)); // when process an AJAX request, anything that would normally be sent to the screen } // is sent back in a response message // rest of php code here ?> <html> <head> <title>Example</title> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js"></script> <script type='text/javascript'> $().ready( function() { $("#btnSub").click( function() { $.get ( "", // target script is "self" {"ajax":1, "x":$("#x").val() }, // data to send function(resp) { // process response $("#result").html(resp); }, "TEXT" // response type ) }) }) </script> </head> <body> Input a number <input type='text' id='x' value='0'> <br> <button id='btnSub'>Get Square</button> <hr> <div id='result'></div> </body> </html>
    1 point
  2. Before you start, make sure you understand Database Normalization. Look online for Real Estate Data Models to see examples of how it is being done. A GUI DB manager like MySQL Workbench will be very helpful. Stay away from Phpmyadmin. Sketch out a "Conceptual Data Model". Then move on to a Logical Data Model, Then a Physical Data Model. This site will help you understand all of that. https://erwin.com/blog/types-of-data-models-conceptual-logical-physical/ Do not "code as you go". Make sure your DB architecture is well planned before you write a single line of code. When you have finalized your DB structure post it here and we will review it for you. When you get to coding, use PDO with prepared statements for you DB actions.
    1 point
  3. I use MySQL Workbench - it's free. I've also been known to us a And there's an SQL tutorial in my sig. which may help.
    1 point
This leaderboard is set to New York/GMT-04:00
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.