Jump to content

gish

Members
  • Posts

    92
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

gish's Achievements

Member

Member (2/5)

0

Reputation

  1. gish

    php tags

    I have just been given some code that is live on a web site. I pulled it down to my local linux machine and the php will not run. I have worked out the issue the php tags are <? scripting ?> it is missing the php. I have a couple of questions how do I get my local linux machine get <? scripting ?> this to work and I have a lot of code that is like this and I am sure that it is no longer secure is this right?
  2. thanks that is what i was looking for
  3. Is there a way to view word.doc in the browser using php. I don't want to modify it just view
  4. I am trying to create a tally by using the get function this is the code so far page one <?php if ($_GET['t'] == ''){ $_GET['t'] = 0; } if ($_GET['q'] == 1){ $answer = "While she is tried."; } else if ($_GET['q'] == 2){ $_GET['t'] = $_GET['t']+1; $tally = $_GET['t']; $answer = "While she is tried."; } else if ($_GET['q'] == 3){ $answer = "While she is tried."; }else { echo '<a href="QuestionOne.php" name="question_one"> Oops you did not select an answer please try again</a>'; } ?> <a href="QuestionTwo.php?t=<?php echo $tally;?>" name="question_two">Question Two</a> This works fine when I send it to QuestionTwo.php i will get 0 or a 1 in the url bar Then I have to ask a question. When the form submits to The next page it does not take the t variable with it. How do I do this?
  5. Hi phpfreaks I need to know how to create a database that will give me the operation of a calander. I want an example. I have looked around the web but can't seem to find anything that will explain what they are doing. I don't want a script. Any assistance would be great thanks gish
  6. the answer is this date("m") - $_SESSION ['calendar'] need to change it to this date("m") + $_SESSION ['calendar'] I had a double negative
  7. this function when called will elevate the month or decrease the month depending on the link you press. I know what the issue is date("m") + $_SESSION //works fine date("m") - $_SESSION //this works very very badly does anyone know how to fix it? =) function GetMonth(){ $Name = $_GET['m']; //this needs to be a session switch($Name) { case b: $_SESSION ['calendar']--; return mktime(0, 0, 0, date("m") - $_SESSION ['calendar'], date("d"), date("y")); break; case f: $_SESSION ['calendar']++; return mktime(0, 0, 0, date("m") + $_SESSION ['calendar'] , date("d"), date("y")); break; default: $_SESSION ['calendar']= 0; return mktime(0, 0, 0, date("m"), date("d"), date("y")); } } echo date("d/m/Y", GetMonth());
  8. Thanks that is what I was looking for. One quick question I have been looking at this date function. [mday] => 17 I understand this tells me the day of the month How do I find out how many days that are in a month?
  9. I mean some think like this $right_now = mktime(0, 0, 0, date("m"), date("d"), date("y")); echo "Current date: ".date("m/d/y", $right_now); The output would be 6/2/2009 then you press a link <href> Then the output would be 6/3/2009 In Australia is d/m/y
  10. The only code I have is the one I have posted I. All I want to do is print the current date, month, year and if I press a link it goes to the same date, next month, and current year. Thanks of data type information
  11. hi me again (0, 0, 0, date("m")+1, date("d"), date("y") is the m, d, y integers
  12. Sorry newbie what do yo mean by type? This is what I have so far? echo date(mktime(0,0,0,$m,$y)); echo date(mktime(0,0,0,$m+1,$y)); but looking at what you had. I need to goto php.net and have another look.
×
×
  • 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.