Jump to content

Tarte

Members
  • Content Count

    60
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Tarte

  • Rank
    Newbie
  1. Tarte

    Calculator

    I can't find the problem in this PHP script !PHP : <?php$name1 = $_POST['name1'];$name2 = $_POST['name2'];$func = $_POST['func'];$submit = $_POST['submit'];if ($submit == false) {include ('form.php');}else if($func == 'add') {include('form.php');$name3 = 'name1' + 'name2';echo "<br><br>";echo "<b>Solution</b>";echo "<br>";echo "$name1 + $name2 = $name3";}else if($func == 'sub') {include ('form.php');$name3 = 'name1' + 'name2';echo "<br><br>";echo "<b>Solution</b>";echo "<br>";echo "$name1 - $name2 = $name3";} else if ($func == 'mul') {include('form.php');$name3 =$name1 * $name2;echo "<br><br>";echo "<b>solutions</b>:";echo"<br>";echo "$name1 x/* $name2 = $name";} else if ($func == 'div') {include('form.php');$name3 = $name1 / $name2;echo "<br><br>";echo "<b>Solutions<b>:";echo "<br>";echo "$name1 / $name2 = $name3";};?> XHTML <form name="calc" action="calc.php" method="post"><table border="0" cellspacing="0" cellpadding="2"><tr><td colspan="4" align="center"><h3><calculator</h3><tr><td><input type="text" name="name1"><td><select name="func"> <option value="add">+</option> <option value="sub">-</option> <option value="mul">*</option> <option value="div">/</option></select><td><input type="text" name="name2"><td><input type="submit" name="submit" value="go"></table></form> Thanks for your help
  2. Tarte

    Search

    Thanks cpgeek for sharing, seems pretty good
  3. If what real_illusions said isn't working, you should try to code it in CSS(Div), it may work better =O.
  4. All right thanks alot, It's probably a porblem with my server, i'll try it on my localhost.
  5. mysql_connect(" ", " ", " ");mysql_select_db(" ");$retour = mysql_query('SELECT COUNT(*) AS nbre_entrees FROM news WHERE ip=\'' . $_SERVER['REMOTE_ADDR'] . '\'');$donnees = mysql_fetch_array($retour);if ($donnees['nbre_entrees'] == 0) { mysql_query('INSERT INTO news VALUES(\'' . $_SERVER['REMOTE_ADDR'] . '\', ' . time() . ')');}else { mysql_query('UPDATE news SET timestamp=' . time() . ' WHERE ip=\'' . $_SERVER['REMOTE_ADDR'] . '\'');}$timestamp_5min = time() - (60 * 5); // 60 * 5 = nombre de secondes écoulées en 5 minutesmysql_query('DELETE FROM news WHERE timestamp < ' . $timestamp_5min);$retour = mysql_query('SELECT COUNT(*) AS nbre_entrees FROM news');$donnees = mysql_fetch_array($retour);echo '<p>Il y a actuellement ' . $donnees['nbre_entrees'] . ' visiteurs connectés sur mon site !</p>';?> I would tell you guys what Error i get, but it seems like there is error on pretty much every lines *lol* so..Thanks for helping me :)PS : I named it ''news'' for some dumb reason, but it has nothing to do with news, it's supposed to show statistic -.-
  6. Anyway, i believe there is already a couples of highly skilled PHP coder in here that are ready to help any questions.
  7. Tarte

    Teamup!

    Can you explain a bit what kind of project it is? It could maybe help you to find peaple. (I could possibly be interested)
  8. I know it has nothing to do with the thread's subject but can anyone explain me the difference between Notepad 2 and notepad++? Thanks alot .
  9. Tarte

    TOP TIPS

    Or maybe there could be a kind of system where experienced peaple could Add Useful tutorials in each languages forum, and those tutorials would be watched by Mods before getting accepted.I'm sure of a thing, Tutorials on specific subject would be sooooooo Helpful.
  10. Tarte

    Spammers

    I've started to be active on this forum 7 months ago but started to Post couple of weeks ago. and no, i do not talk about 'justsomeguy' because he has alot of post but because I believe he is one of the most active member on this forum, and because he seems to spend couple hours each day to surf on the forum(Which is I think more than any Members or Mods out there)That's the only reason why I named him more than anyone.
  11. Tarte

    help with IE

    I also believe that the missing </div> in Header.php could be the problem.
  12. Tarte

    Spammers

    I think that if you guys Take 1 or 2 peaple that has been devoted to the forum for a long time, that would do the job. Peaple like ''Justsomeguy'' would do a really good job.Just my opinion^^
×
×
  • Create New...