Jump to content

OranniS

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

About OranniS

  • Birthday 03/26/1988

Profile Information

  • Gender
    Male
  • Location
    Gent, Belgium

OranniS's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. actually, that was the whole point, being able to acces them as they were afterwards... anyway i got an error: Warning: htmlspecialchars() expects parameter 1 to be string, array given in c:\phpdev\www\public\survey\vraag1.php on line 33 was i supposed to customize that piece of code? edit: aaah i get what you mean, the php script first generates the formname using the variable, then in the second page it generates a variable, using the formname that was compiled on the prevoious page,... well you'r right, thats not what i want, what i want is to have the complete syntax as it was before the compiling...
  2. ok so when i do this script, i should be able to get all my POST varnames, without using $_POST['']? i'll try this!!
  3. i... dont think i quite understand everthing in that structure... what does the=> stand for?could you explain it a bit? <?php foreach( $_POST as $key => $value ) { ${$key} = htmlspecialchars($value); } ?>
  4. well what i want to do : call on a variable wich was used in the previous page.I did this with POST. so my ode would look like this: <input name="awnser1"> -->then the code would be: $awnser=$_POST['awnser1'] but the clue is that the thing i use POST on is also a variable: so i get for instance: <? $page_n=1; ?> <input name="anwser<?echo"$page_n"?>"> so the server would compile the above as <input name="awnser1"> what i want to use in the next page now is the value "awnser$page_n", but i can't find a way to do this...
  5. hello what i want to exactly is this: in my code, i have used POST to get a variable to the next page. but the variable itself is also a variable. for instance: [code]<? $pagenumber= "2" ?> <input name="page<?echo="$number"; ?>"[/code] so my question is, how do i call on this variable in the next page? these are the ones that i have tried yet. [code] $pagenumber=$_POST['page' . '$number'] $pagenumber=$_POST['page$pagenumber'] [/code] none of these work actually, and i even dont know wether its possible, but it would be unlogical if it weren't, wouldn't it. If you have a way of making this work, via POST or other, let me know! the main idea is to get the value of a variable to the next page, and the value of this variable is" $variable" (yeah i know its darn confusing ;D) thanks OranniS
  6. hi i was making a start page, where one must register a personal code, as in password, to proceed to the main site. to check if the code has already been used by someone else, i used the mysql_num_rows() function, but somethings making it fail... this is where i define a function wich is causing the whole jam. ive tried echoeing here and there, turns out the line with the error is the one with the $count = mysql_num_rows($result) or die(mysql_error());... [code]PHP Code: <?php     session_start();     require_once('vars.php');         //connectie maken met DB             $db = mysql_connect("localhost", "dieetopmaat_be", "dieetDB") or die(mysql_error());             mysql_select_db(dieetopmaat_be, $db) or die(mysql_error());         function check_presence($table, $row, $value){             $sql = "SELECT *    FROM $table                             WHERE $row = '$value'";         $result = mysql_query($sql) or die(mysql_error());         $count = mysql_num_rows($result) or die(mysql_error());     if($count >= 1)         {         return TRUE;     }else         {         return FALSE;     }[/code] thanks to anyone who replies! OranniS ps: dont mind the language, its written in dutch
×
×
  • 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.