Jump to content

bank

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

bank's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. What I would do, firstly, take the variable $counter = 1 out side of the while function (else it will be the same everytime), then change is value to 0, in the first few lines of the while function place $counter++;. To achieve what you want to, I would add an if into your while, catch my drift? $counter = '0'; while($something is going on) { $counter++; if($counter = $counter%2) { echo '<tr><td>'; echo $row['firstname'] . " ". $row['midname'] . " " . $row['lastname'] . " "; echo $row['address'] . " " . $row['address2'] . " "; echo $row['town'] . " " . $row['county'] . " "; echo $row['postcode'] . " "; echo $row['telephone'] . " / " . $row['mobile'] . " "; echo $row['contactname1'] . " " . $row['contactnumber1'] . " "; echo $row['contactname2'] . " " . $row['contactnumber2'] . " "; echo "DOB: " . $row['dob']; echo '</td>'; } else { echo '<td>' echo $row['firstname'] . " ". $row['midname'] . " " . $row['lastname'] . " "; echo $row['address'] . " " . $row['address2'] . " "; echo $row['town'] . " " . $row['county'] . " "; echo $row['postcode'] . " "; echo $row['telephone'] . " / " . $row['mobile'] . " "; echo $row['contactname1'] . " " . $row['contactnumber1'] . " "; echo $row['contactname2'] . " " . $row['contactnumber2'] . " "; echo "DOB: " . $row['dob']; echo '</td></tr>'; } } Just fiddle it around slightly, but that will get your Student 1's details | Student 2's Details ------------------------------------------------------- Student 3's Details | Student 4's Details style table
  2. Well, it uses a breadcrumb trail, as I recall, if you're running a forum, you could run a mysql query to find sub directories.
  3. Basically, you've tried to use .html as php, take your script and place it in a separate file and name it something like sendmessage.php, then inside your contact.htm file edit this: <form name="form1" method="post" action=""> and change it to this: <form name="form1" method="post" action="sendmessage.php"> You can change sendmessage.php for what ever you decide to call the new file. Also, you should really notify your users that their message has been sent, so swap this /* * Please be away that this can still be attacked by spam bots and they may use this to send you junk emails. */ $to = "studentmatters@yahoo.com"; $subject = "Feedback"; $headers = "From: $name <$email>"; mail($to,$subject,$msg,$headers); } Swap it for: /* * Please be away that this can still be attacked by spam bots and they may use this to send you junk emails. */ $to = "studentmatters@yahoo.com"; $subject = "Feedback"; $headers = "From: $name <$email>"; mail($to,$subject,$msg,$headers); header('location:thanks.html'); } And create a page called thanks.html, it will come up after some one has contacted you.
  4. Just notifying you although you're contact page doesn't work, and some how, your websites displaying tg in the top right corner, which might be related to another cookie I've had, might want to alter your cookies. From the looks of things you've just put the code in the wrong places on the login section, you've displayed it as text rather than as code.
  5. Looks like a great idea, anyway, heres another problem: It happens after not placing any input.
  6. how about using a php based script with its headers set at pictures, therefore those who aren't registered cannot view the picture, as image hosts use, so http://somewebsite.php/pictures.php?image=picture.jpg
  7. Dear All, I've recently obtained a windows server, so that I could use it as a remote desktop, although I've come around to the idea of using apache to run a website off it in combination with mysql although I've tried testing the service although it doesn't want to use the php module, ie it says that the required file doesn't exist, I've had a look and I can confirm its there, any ideas of how to resolve this? Could it possibly be a permissions fault, if so how can I resolve this? Thanks In advance
×
×
  • 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.