Jump to content

dodgeitorelse3

Members
  • Posts

    195
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by dodgeitorelse3

  1. Assuming you ran a query to get $result your first option has no value set. The second option should have the echo inside quotes just like your submit does.
  2. Did you bother to test the 2 suggestions?
  3. are you saying that you want to track all included pages or required pages in tracking as well?
  4. How does the section near top to define variables work? Wouldn't that make $username be the value of $confirm_password?
  5. This tip is taken from https://www.php.net/manual/en/function.split.php Tip split() is deprecated as of PHP 5.3.0. preg_split() is the suggested alternative to this function. If you don't require the power of regular expressions, it is faster to use explode(), which doesn't incur the overhead of the regular expression engine.
  6. your table header also has an extra <th> before user name
  7. With the given information I would guess that you need to make sure the survey script has been written to verify that the fields are filled.
  8. what do the curly brackets before and after header go to?
  9. is there supposed to be a comma at the end of 'kudokey' => $kudokey, ?
  10. I am guessing OP's original post had the html part of code in an .html file and the php code was what he had in his form action file
  11. I don't know what code is in test_time.php so I get an error that that page is not found. When I remove the form action page and leave it blank it seems to work for me and it seems to be starting the time when page loads. This was tested on my linux server.
  12. Grrrrrr..... Just when I think I have it figured out you folks throw out such sweet, short and simple solutions! Thank you very much I can't find where to mark this thread as solved, please mark it for me, thank you
  13. Thank you, I will look into that. It may be easier than this. I went back to the php page I linked to and tried a sample that was there and got the result I was looking for. Now I have a headache $mapname='mapname1'; $type="pvp"; $beta="y"; $final="n"; $modded="n"; $classification="land"; $sf="n"; $tod="dawn"; $weather="fog"; $es2="y"; $mapname2='mapname2'; $type2="pvp"; $beta2="n"; $final2="y"; $modded2="n"; $classification2="sea"; $sf2="n"; $tod2="night"; $weather2="clear"; $es22="n"; $mapname3='mapname3'; $type3="pvp"; $beta3="y"; $final3="n"; $modded3="y"; $classification3="air"; $sf3="y"; $tod3="day"; $weather3="rain"; $es23="n"; $tadminlist["pvp"] = array ( ); array_push($tadminlist["pvp"], array ("name" => $mapname, "type" => $type, "beta" => $beta, "final" => $final, "modded" => $modded, "classification" => $classification, "sf" => $sf, "tod" => $tod, "weather" => $weather, "es2" => $es2)); array_push($tadminlist["pvp"], array ("name" => $mapname2, "type" => $type2, "beta" => $beta2, "final" => $final2, "modded" => $modded2, "classification" => $classification2, "sf" => $sf2, "tod" => $tod2, "weather" => $weather2, "es2" => $es22)); array_push($tadminlist["pvp"], array ("name" => $mapname3, "type" => $type3, "beta" => $beta3, "final" => $final3, "modded" => $modded3, "classification" => $classification3, "sf" => $sf3, "tod" => $tod3, "weather" => $weather3, "es2" => $es23)); echo "<pre>"; print_r($tadminlist); echo "</pre>"; echo "line = mapname, type, beta, final, modded, classification, sf, tod, weather, es2<br /><br />"; $i =0; foreach($tadminlist["pvp"] as $tlist) { echo $tadminlist['pvp'][$i]['name'].", ". $tadminlist['pvp'][$i]['type'].", ". $tadminlist['pvp'][$i]['beta'].", ". $tadminlist['pvp'][$i]['final'].", ". $tadminlist['pvp'][$i]['modded'].", ". $tadminlist['pvp'][$i]['classification'].", ". $tadminlist['pvp'][$i]['sf'].", ". $tadminlist['pvp'][$i]['tod'].", ". $tadminlist['pvp'][$i]['weather'].", ". $tadminlist['pvp'][$i]['es2']."<br /><br />"; $i++; } echo "sort test<br />"; $data = $tadminlist["pvp"]; function array_orderby() { $args = func_get_args(); $data = array_shift($args); foreach ($args as $n => $field) { if (is_string($field)) { $tmp = array(); foreach ($data as $key => $row) $tmp[$key] = $row[$field]; $args[$n] = $tmp; } } $args[] = &$data; call_user_func_array('array_multisort', $args); return array_pop($args); } // Pass the array, followed by the column names and sort flags $sorted = array_orderby($data, 'name', SORT_DESC); $a=0; foreach($sorted as $tlist) { echo $sorted[$a]['name'].", ". $sorted[$a]['type'].", ". $sorted[$a]['beta'].", ". $sorted[$a]['final'].", ". $sorted[$a]['modded'].", ". $sorted[$a]['classification'].", ". $sorted[$a]['sf'].", ". $sorted[$a]['tod'].", ". $sorted[$a]['weather'].", ". $sorted[$a]['es2']."<br /><br />"; $a++; } echo "<pre>"; print_r($sorted); echo "</pre>"; and my output is Array ( [pvp] => Array ( [0] => Array ( [name] => mapname1 [type] => pvp [beta] => y [final] => n [modded] => n [classification] => land [sf] => n [tod] => dawn [weather] => fog [es2] => y ) [1] => Array ( [name] => mapname2 [type] => pvp [beta] => n [final] => y [modded] => n [classification] => sea [sf] => n [tod] => night [weather] => clear [es2] => n ) [2] => Array ( [name] => mapname3 [type] => pvp [beta] => y [final] => n [modded] => y [classification] => air [sf] => y [tod] => day [weather] => rain [es2] => n ) ) ) line = mapname, type, beta, final, modded, classification, sf, tod, weather, es2 mapname1, pvp, y, n, n, land, n, dawn, fog, y mapname2, pvp, n, y, n, sea, n, night, clear, n mapname3, pvp, y, n, y, air, y, day, rain, n sort test mapname3, pvp, y, n, y, air, y, day, rain, n mapname2, pvp, n, y, n, sea, n, night, clear, n mapname1, pvp, y, n, n, land, n, dawn, fog, y Array ( [0] => Array ( [name] => mapname3 [type] => pvp [beta] => y [final] => n [modded] => y [classification] => air [sf] => y [tod] => day [weather] => rain [es2] => n ) [1] => Array ( [name] => mapname2 [type] => pvp [beta] => n [final] => y [modded] => n [classification] => sea [sf] => n [tod] => night [weather] => clear [es2] => n ) [2] => Array ( [name] => mapname1 [type] => pvp [beta] => y [final] => n [modded] => n [classification] => land [sf] => n [tod] => dawn [weather] => fog [es2] => y ) ) Now to take what I need and put it into my actual page of code where it is to be used. I will post back when I test what you suggested. Thank you for the direction (and hint) as well as your time.
  14. I have an array that is created using the following code: $mapname='mapname1'; $type="pvp"; $beta="y"; $final="n"; $modded="n"; $classification="land"; $sf="n"; $tod="dawn"; $weather="fog"; $es2="y"; $mapname2='mapname2'; $type2="pvp"; $beta2="n"; $final2="y"; $modded2="n"; $classification2="sea"; $sf2="n"; $tod2="night"; $weather2="clear"; $es22="n"; $mapname3='mapname3'; $type3="pvp"; $beta3="y"; $final3="n"; $modded3="y"; $classification3="air"; $sf3="y"; $tod3="day"; $weather3="rain"; $es23="n"; $tadminlist["pvp"] = array ( ); array_push($tadminlist["pvp"], array ("name" => $mapname, "type" => $type, "beta" => $beta, "final" => $final, "modded" => $modded, "classification" => $classification, "sf" => $sf, "tod" => $tod, "weather" => $weather, "es2" => $es2)); array_push($tadminlist["pvp"], array ("name" => $mapname2, "type" => $type2, "beta" => $beta2, "final" => $final2, "modded" => $modded2, "classification" => $classification2, "sf" => $sf2, "tod" => $tod2, "weather" => $weather2, "es2" => $es22)); array_push($tadminlist["pvp"], array ("name" => $mapname3, "type" => $type3, "beta" => $beta3, "final" => $final3, "modded" => $modded3, "classification" => $classification3, "sf" => $sf3, "tod" => $tod3, "weather" => $weather3, "es2" => $es23)); echo "<pre>"; print_r($tadminlist); echo "</pre>"; echo "line = mapname, type, beta, final, modded, classification, sf, tod, weather, es2<br /><br />"; $i =0; foreach($tadminlist["pvp"] as $key => $tlist) { echo $tadminlist['pvp'][$i]['name'].", ". $tadminlist['pvp'][$i]['type'].", ". $tadminlist['pvp'][$i]['beta'].", ". $tadminlist['pvp'][$i]['final'].", ". $tadminlist['pvp'][$i]['modded'].", ". $tadminlist['pvp'][$i]['classification'].", ". $tadminlist['pvp'][$i]['sf'].", ". $tadminlist['pvp'][$i]['tod'].", ". $tadminlist['pvp'][$i]['weather'].", ". $tadminlist['pvp'][$i]['es2']."<br /><br />"; $i++; } The output is: Array ( [pvp] => Array ( [0] => Array ( [name] => mapname1 [type] => pvp [beta] => y [final] => n [modded] => n [classification] => land [sf] => n [tod] => dawn [weather] => fog [es2] => y ) [1] => Array ( [name] => mapname2 [type] => pvp [beta] => n [final] => y [modded] => n [classification] => sea [sf] => n [tod] => night [weather] => clear [es2] => n ) [2] => Array ( [name] => mapname3 [type] => pvp [beta] => y [final] => n [modded] => y [classification] => air [sf] => y [tod] => day [weather] => rain [es2] => n ) ) ) line = mapname, type, beta, final, modded, classification, sf, tod, weather, es2 mapname1, pvp, y, n, n, land, n, dawn, fog, y mapname2, pvp, n, y, n, sea, n, night, clear, n mapname3, pvp, y, n, y, air, y, day, rain, n I would like to sort the foreach loop by name in descending order. I read the page at http://php.net/manual/en/function.array-multisort.php but was unable to figure it out. Could someone give me some direction please?
  15. Student was given assignment to RTFM. Student was graded on assignment using a simple question/answer sheet. Teacher graded students question/answer sheet and put grade into a variable called $student_grade < if($student_grade === "Passed"){ //student passed question/answer sheet so.... echo "Great job, you RTFM"; } else{ //student failed question/answer sheet so.... echo "You did not RTFM"; } >
  16. You said you have been using inkscape so why not try it yourself to see if it opens the file you are questioning? You would have had an answer in the time it took you to post and wait for a reply. ?
  17. I think your require vendor file needs to have ../ instead of ./
  18. I have 64 bit computer but I failed a y2k38 test returned a date in 1969 lol, guess I'll be finding solution to this. Of course it is using $date = '2040-02-01'; $format = 'l d F Y H:i'; $mydate1 = strtotime($date); echo '<p>', date($format, $mydate1), '</p>'; but when I use $date = '2040-02-01'; $format = 'l j F Y H:i'; $mydate2 = new DateTime($date); echo '<p>', $mydate2->format($format), '</p>'; I get my expected future date
  19. in original post you have action="submiiresults.php" is it really submiiresults or submitresults?
  20. ginerjm was asking you where you are calling the css from, yes you showed the css code but how is your page to know to use that css code
  21. About all I can tell from the image is that you are correct, count is not showing. Maybe show us your code and we could possibly help figure it out.
×
×
  • 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.