Jump to content

Trader77

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Trader77's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi I am sure this is wery easy problem for you, but I can't solve it. So here is part of my php code: $haku = mysql_query($kysely, $yhteys) or die("Virhe kyselyssä!"); echo "<table border='0' cellpadding='3' cellspacing='1' align='center'>"; echo "<tr bgcolor='#000066'><td width='20' align='center' valign='top' class='smallText'><FONT color='#FFFFFF'><b>Nro</b></td><td width='20' align='center' valign='top' class='smallText'><FONT color='#FFFFFF'><b>Etunimi</b></td><td width='20' align='center' valign='top' class='smallText'><FONT color='#FFFFFF'><b>Sukunimi</b></td><td align='center' valign='top' class='smallText'><FONT color='#FFFFFF'><b>Sähköposti</b></td><td align='center' valign='top' class='smallText'><FONT color='#FFFFFF'><b>Liittymisaika</b></td><td align='center' valign='top' class='smallText'><FONT color='#FFFFFF'><b>Syntymäaika</b></td></tr>"; //käydään jäsentiedot läpi for ($i = 0; $i < mysql_num_rows($haku); $i++) { //haetaan tiedot muuttujiin $nro = mysql_result($haku, $i, "N/O"); $etunimi = mysql_result($haku, $i, "etunimi"); $sukunimi = mysql_result($haku, $i, "sukunimi"); $oso = mysql_result($haku, $i, "osoite"); $postint = mysql_result($haku, $i, "postint"); $email = mysql_result($haku, $i, "email"); $saika = mysql_result($haku, $i, "saika"); $laika = mysql_result($haku, $i, "laika"); $ip = mysql_result($haku, $i, "ip"); //tulostetaan taulukon rivi echo "<tr bgcolor='#E7E7E7'><td>$nro</td><td>$etunimi</td><td>$sukunimi</td><td>$email</td><td>$laika</td><td>$saika</td></tr>"; } echo "</table>"; $saika is date and it's format is like 2010-01-02. How can I change the format like 02.01.2010.
  2. Thank you! This helped a lot. Now ewerything is working great!! Thanks again!
  3. Hi. I have one question. In my index.php page I have this kind of code: // listaa sivut $pages = Array ( "etusivu" => "etusivu.php",, "linkit" => "linkit.php", "yhteydet" => "yhteydet.php", "tiedotteet" => "tiedote.php", "uutiset" => "uutiset.php", "tapahtumat" => "tapahtumat.php", ); // Jos sivua ei loydy, naytetaan etusivu $page = ($_GET["page"] != "") ? $_GET["page"] : "etusivu"; if (isset($pages[$page]) AND file_exists($pages[$page])) { include ($pages[$page]); } else { // Jotakin vaarin! naytetaan 404-viesti echo "Virhe 404 - Sivua ei löydy!"; } function MakeArray ($dir) { global $pages; $handle = OpenDir ($dir) or die ("Couldn't open $handle!"); while (FALSE !== ($file = ReadDir($handle))) { if ($file != ".." AND $file != ".") { if (is_dir($dir . $file)) { MakeArray ($dir . $file . "/"); } else { $pages[ereg_replace("\.(.*)$", "", $file)] = $dir . $file; } } } CloseDir ($handle); } ?> Ewerything else works ok, but I want put in $pages array page tapahtumat&page=2. How to do it? I mean that this addres works in index php: www.mydomain.com/index.php?page=tapahtumat This addres does not work: www.mydomain.com/index.php?page=tapahtumat&page=2 What I have to do?
×
×
  • 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.