Jump to content

flolam

Members
  • Posts

    96
  • Joined

  • Last visited

    Never

About flolam

  • Birthday 10/12/1991

Profile Information

  • Gender
    Male
  • Location
    Vienna, Austria

flolam's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. the array_map should be array_map(array("className", "prepSessions"), $this->sessions)) where, of course, className is to be replaced with whatever classname you have
  2. Yes, you would have to submit the form using ajax. Googleing "ajax submit form" I found http://www.simonerodriguez.com/ajax-form-submit-example/ , but I'm sure you will find loads of other tutorials.
  3. take a look at autoloading: http://php.net/manual/de/language.oop5.autoload.php
  4. if you use variables in double-quoted strings, the PHP interpreter replaces them with their values. Thus, you will have to use single-quotes: $stringData = '$newcolumn = $info[\'newcolumn\']';
  5. remove the appended number from the field names (so for example "Item1", "Item2" etc. becomes simply "Item") and then $total4 = $_Post["Total4"]; $client_details = $_Post["Client_Details"]; unset($_Post["Client_Details"]); unset($_Post["Total4"]); foreach ($_Post as $inputgroup) { echo $inputgroup["Item"]; echo $inputgroup["Price"]; //... }
  6. you don't need a foreach. just remove this line: $age = mysql_fetch_assoc($getinfo); and change the while statement to this: while ($age = mysql_fetch_assoc($getinfo)) {
  7. you could make your links point to <a href="/index.php?site=index"></a> <a href="/index.php?site=mkvsdc"></a> ... etc. and then change the include to <?php if (!$_GET["site"]) { //in the case that no site was specified, include index.html include "index.html"; } else { include $_GET["site"].".html"; } ?> Also, include should be used without brackets
  8. flolam

    Linking

    funny question, of course it is allowed
  9. does your button image file have a .jpg (and not jpeg, gif, png etc) file extension?
  10. your onchange event doesn't send any data back to the server, where the php file is. It only changes the location at the client-side. You will either have to use ajax or use normal links
  11. google -> "directory index hide file" -> first result -> http://www.hackersdiary.com/how-to-hide-files-from-apaches-directory-index/ IndexIgnore .htaccess IndexIgnore *.jpg
  12. of course, this will always work: $a = "31"; if ($a == "29" || $a == "30" || $a == "31" || $a == "32") { echo "true"; } --edit-- or: $a = "31"; $b = array("31", "32"); if (in_array($a, $b)) { echo "true"; }
  13. this does work on my machine: $a = "31"; if ($a == "29" || "30" || "31" || "32") { echo "true"; } //output: true --Edit-- I just noticed that this will always return true, no matter what value $a has
  14. what is the problem with the code you have? if you want to check whether the string contains this number, you will have to use a function like strstr (http://php.net/manual/en/function.strstr.php), because currently you are checking whether the variable has exactly this value
  15. look at my post: you need to insert mysql_fetch_assoc AFTER you do mysql_query
×
×
  • 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.