Jump to content

sigmahokies

Members
  • Content Count

    138
  • Joined

  • Last visited

Community Reputation

0 Neutral

About sigmahokies

  • Rank
    Advanced Member

Profile Information

  • Gender
    Male
  • Location
    Richmond, VA
  1. Hi Phill W., I know about SQL injection, it's wide open. but it's practice, I said i will set up the SQL security after I make sure Insert and update is working. Relax! Also, I know how to close SQL in PHP, I want to make sure it is working, beside, it's in xampp, so it's localhost, not open to internet. I'm not that dumb. I need to practice to make it work, so I can move on with my demonstration to interview. SQL injection is my last to install in my code in PHP. Thanks, Gary
  2. I don't understand why it doesn't work to insert in Phpmyadmin (MariaDB) with my code...It saying failed to add all times. I know about security issue, I will install security later. I just want to make sure insert into MariaDB is working, then I will set up security system. Here my code: /* Register and check username and email is exist or not */ if (isset($_POST['submitted'])) { $username = $_POST['user']; $email = $_POST['email']; $first = $_POST['first']; $last = $_POST['last']; $password = $_POST['password']; $check_user = "SELECT * FROM username where Username = '".$usern
  3. All right, I'm trying to tell you that I'm trying to get all array from $srs in above of script into function below of loop in array, but problem is PHP still does not recognize $srs is defined from beginning of script; Look at image screen as example that need to be done.
  4. <?php $srs = array(); for ($section = 1; $section < 5; $section++) { for ($row = $section; $row < 10; $row++) { for ($seat = $row; $seat < 20; $seat++) { $srs[] = array( 'section_name' => $section, 'row_name' => $row, 'seat_name' => $seat); } } } output(convert_array($srs)); // Converts the array function convert_array($input) { return $input; } function output($obj) { echo "<pre>"; print_
  5. All right gw1500se, Here my full code, but it is three file different. one html and two php. I use php file to upload video, I use one html to let anyone know (display on monitor) that file is exist in folder. upload file first: <?php ?> <!doctype html> <html> <head> <link href="css/upload.css" rel="stylesheet" type="text/css"> </head> <body> <form action="upload.php" method="post" enctype="multipart/form-data"> <table class="table"> <tr>
  6. Hi gw1500se, This part is not work to not send to other site name 'exist.html' if php find one video is inside folder in server. I notice server is still taking uploading file when file is exist already in folder. I'm trying to stop upload file into folder when there is one video or document inside folder already.
  7. Hi everyone, I'm still learning, but getting intermediate in PHP now, but it is still challenge to learn. I'm trying to have php check to see if one file inside folder in server, seem I could not get it right, but I tested it on other site, it works, but not this script, I don't understand why it won't work...maybe logical is wrong? here my code: if ($_POST['video']) { $path1 = "UPLOADS/Home/"; $path2 = "UPLOADS/Breakfast/"; $path3 = "UPLOADS/Spider/"; $scan1 = scandir($path1); $scan2 = scandir($path2); $scan3 = scandir($path3);
  8. All right, here my original code - <!doctype html> <html> <head> <title>Stimulation Video Home Alone</title> <link href="css/grammar.css" rel="stylesheet" type="text/css"> <link rel="icon" href="images/sigma.png"> <script type="text/javascript" src="js/checkbox.js"></script> <script> function clickvideo() { let x = document.getElementById("btn"); document.getElementById("display").innerHTML = "<video width='430' controls style='border-radius: 5px;' height='240' type='mp4
  9. Hi gw1500se, I'm trying to create the loop that which read directory from folder with Javascript inside echo by loop like this - $file = opendir("htdocs/site/"); while($files = readdir($file)) { echo "<button onclick='test()'>".$files."</button><br />"; } it will create few button that will have text on buttons which list in folder. Right now, I'm trying to make function in JavaScript when someone click one of several buttons, then JavaScript should response to change file or video or image. like you saw some website has several button, then you click
  10. Hi everyone, I want to know, will Javascript's onclick on button work in PHP while loop? I mean, If I out "onclick" with function inside html tag, then put html inside echo under while loop. Will JavaScript's onclick work? Like this script below: $i = 0; while( $i < 5) { echo "<button id='btn' onclick='test()'>Hello</button>"; $i++; } This loop will create 4 times loop with same echo with onclick, so will onclick call Javascript programming?
  11. seem it works, not need to have php to remind... Thank you, Barand Gary Taylor
  12. Hi everyone, I am trying to have "require" label on form. If someone did not select the option on list, then "require" label will appear in form after submit. Seem my code isn't work. what did I do wrong? <?php$buzz = $buzz2 = ""; if ($_SERVER['REQUEST_METHOD'] == "POST") { if (empty($_POST['select'])) { $buzz = "<h2><color color='red'> >- </color></h2>"; $buzz2 = "<h2><color='red'> -< </color></h2>"; }} ?><!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <t
  13. Dodgeitorelse, it is above already. it is my code in php. it is on first I post in this thread.
  14. Hi dodgeitorelse3, Yes. I am trying to add the data into the database. I need to make a flexible in array and column that can insert or update into database with any number of columns. For example, If table has three columns, then program can set the value to store data tp update or insert three data from input in HTML. Please forgive me, I'm ASL user, so English is my second language, I am doing my best to make this post is understandable.
×
×
  • 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.