Jump to content

sigmahokies

Members
  • Content Count

    136
  • Joined

  • Last visited

Community Reputation

0 Neutral

About sigmahokies

  • Rank
    Advanced Member

Profile Information

  • Gender
    Male
  • Location
    Richmond, VA
  1. 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.
  2. <?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_
  3. 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>
  4. 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.
  5. 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);
  6. 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
  7. 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
  8. 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?
  9. seem it works, not need to have php to remind... Thank you, Barand Gary Taylor
  10. 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
  11. Dodgeitorelse, it is above already. it is my code in php. it is on first I post in this thread.
  12. 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.
  13. Barand, I tried that. I don't see any inside post in php.
  14. I cannot see what is inside $_POST in form during php is interpreting. if there is possible to see what is inside $_POST, Please show me how... Gary
×
×
  • 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.