Jump to content

Rayj2019

New Members
  • Posts

    4
  • Joined

  • Last visited

Rayj2019's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Yea, been coding since the 80's...mostly machine code. But created a lot of javascript both client and server, more recently. I understand the security issues. I'm not an idiot. Thanks.
  2. Sorry if this is not the correct thread for this. I am not a web developer, per-se. However I know enough to be dangerous! 😯 However I am creating website for a small business. I'm at the point that I need to incorporate login/authentication. I don't need it on the index page, but I do need it on one other page. I'm not having luck finding a script online. Can anyone point me to either a freeware or not real expensive login script with the following capabilities: -sign up/register -verify registration via email -Login applies to one page (not index.html). I have a page with a php form that needs password protection -Secure password creation/storage (MySQL) -remember password -change password Thanks and appreciate comments. Ray
  3. Does not seem to be working? $sql = "SELECT streamID FROM broadcast WHERE id=1"; if ($result = mysqli_query($conn, $sql)) { $row = $result->fetch_assoc(); echo "stream = " $row; } stream = ???
  4. So I have a very small database right now. It looks like this: mysql> select * from broadcast; +----+-------------------+ | id | streamID | +----+-------------------+ | 1 | lxdlp0u20D1QdLt6s | +----+-------------------+ 1 row in set (0.00 sec) I can update the streamID just fine using another php file. The problem I am having it accessing it and reading it out. Here is the php/mysql I am using. When I browse to this I never see the output! <?php $debug = TRUE; ini_set( "log_errors", TRUE); ini_set( "error_log", "/var/log/php_error.log"); ini_set( "display_errors", $debug ); error_reporting(E_ALL); //-------------------------------------------------------------------------- // Example php script for fetching data from mysql database //-------------------------------------------------------------------------- $servername = "localhost"; $username = "root"; $password = "1*General2019"; $dbname = "WebRTCApp"; $tableName = "broadcast"; //-------------------------------------------------------------------------- // 1) Connect to mysql database //-------------------------------------------------------------------------- // mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); $conn = mysqli_connect($servername,$username,$password, $dbname); if (mysqli_connect_error()) { $err = mysqli_connect_error(); if( $debug ) exit( "Error: $err" ); logerr( $err ); exit( "Failed to connect to the database!"); } echo "Connected Successfully"; $sql = "SELECT streamID FROM broadcast WHERE id=1"; // $sql = 'SELECT id FROM broadcast WHERE streamID = E0ArubgkL9q2SCrXL'; $stream = mysqli_query($conn,$sql); if( !$stream) { $err = mysqli_error( $conn ); logerr( $err ); if( $debug ) echo "Error: $err<br>" }; echo "<br>"; echo "stream = " $stream; mysqli_close($conn); ?> Any idea why I am not seeing the stream (mysql streamID)? Appreciate your response. Ray
×
×
  • 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.