Jump to content

Leadwing

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Leadwing's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks guys that very helpful! I'm aware it only displays HTML, its just I thought there was software one could get which litterally just downloads all the html files, php files, jpgs, etc. Am i wrong? Thanks for the help though guys
  2. Hi there, I have an admin section to my website, where you are required to provide a username and password, and retrieves the username and password from a database. My questions are: 1. How do I make the following pages innacessible without logging in first? Would a simple session work? 2. Surely someone could just download the files from my website and find out the username and password required to access the database? This is the same for other parts of the site, in the PHP code I specify my username and password to access a database... Surely this is very insecure? Thanks
  3. Hi there, I have a page with an image upload and a textarea field. The image upload works fine, but I also want to create a text file which is called the $_SESSION['name'] (which is given earlier on) and contains what they put in the field. I have: $imgname = $_SESSION['name'] $file = $imgname; $fh = fopen($file, 'w') or die("can't open file"); $imgnote = $_POST['imgnote']; fwrite($fh, $imgnote); fclose($fh); I dont understand why it wont work, I can get it to be named anything else. It comes up with "Parse error: syntax error, unexpected T_VARIABLE in #####.co.uk/user/htdocs/ss/ss4.php on line 28" And i do have a working session and everything! Thanks
  4. Hi there, Im fairly new to PHP... Is it possible to have something like: if variable1=true AND variable2=true echo "result1" elseif variable1=true AND variable2=false echo "result2" elseif variable1=false AND variable2=true echo "result3" elseif variable1=false AND variable2=false echo "result4" In reality there are more variables, but just so you understand. I dont know how to have multiple variables in a if statement... the "AND" Can i just use ";" or something? Thanks
  5. Thanks, that works nicely One last thing... I have a page in between page 2 and 3, its a code to redirect to page 3 or another page (I wont go into details). But my question is how can I use that <input type="hidden" name="givenname" value="<?php echo $_POST['givenname']; ?>" /> On a page which doesn't have a form? - Just an if/elseif command? Hope that makes sense.
  6. Hi there, I have a form with multiple pages. In order to pass data from the the first page of a form to the second page, i understand you need to use... <input type="hidden" name="$_POST['name']" /> ...in the second page. But it doesnt seem to work (when i try to display it on the third page) Also how do I get the data to go through a "process", which is like, in between the form pages? Helpsies would be greatly apreciated
  7. Hi there, All I want is a very simple form with 2 radio buttons and a Next button. Whichever button they choose will determine which page will appear next. I've looked everywhere and tried several things but for some reason it just wont work! Can someone help? Thanks
×
×
  • 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.