Jump to content

rlindauer

Members
  • Posts

    121
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

rlindauer's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. You would do the same thing. Pad the numbers with PHP
  2. You have set these variables ($folder, $file) and trimmed them, but do not use them. <?php $folder = trim($style_text[1]); // Set the folder name $file = trim($style_text[3]); // Set the file name echo ROOTURL . "include/styles/" . $style_text[1] . "/" . $style_text[3] . ".css<br /><br />"; ?>
  3. <?php require("db.inc.php"); if(! empty($_POST['UserName']) && ! empty($_POST['Password'])) { $UserName = mysql_real_escape_string($_POST['UserName']); $PassWord = mysql_real_escape_string($_POST['Password']); $sql = "SELECT UserName FROM login_table WHERE UserName = '{$UserName}' AND Password = '{$Password}'"; $query = mysql_query($sql); if(mysql_num_rows($query) == 1) { echo "You have been sucessfully logged in! <br><br> <a href="result.php">Continue...</a>"; } else { echo "Your login failed. =( <br><br> <a href="index.html">Go back...</a>"; } } else { die("You did not enter a name and email address"); } ?> You have syntax errors. You have to escape your quotes in your echo statements.
  4. Update is a reserved word in MySQL. http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html
  5. Look up the ternary operator. http://us3.php.net/language.operators.comparison
  6. There are more syntax errors. Are you using a decent editor? It will highlight your code and you can see the problem. You are missing a closing quote and semi-colon after an echo <?php echo "<td>".$row['entry']."</td>"; echo "</tr>"; } ?>
  7. Did you copy/paste that code exactly? You have some syntax errors: <?php $con=mysql_connect("***","***","***") if($con) { die('Problem connecting to the database:'.mysyql_error()); } mysql_select_db("kylban5_banta",$con); $result=mysql_query("SELECT entry FROM politics"); echo "<table border='1'> while($row=mysql_fetch_array($result)); { echo "<tr>"; echo "<td>".$row['entry']."</td>"; echo "</tr> } echo "</table>"; mysql_close($con); ?> You aren't closing your echo statement. And you have a semi-colon after while... <?php echo "<table border='1'>"; while($row=mysql_fetch_array($result)) ?>
  8. No, you need to define the variable in your php code.
  9. I want a forum that will auto post for me. You know, to make it seem like I am active. Or, a forum that runs itself. Automatically updates, automatically creates backups, automatically bans people. The less work I have to do the better How about a forum that you never have to even visit? All posts are done via email, text messaging, through desktop widgets, or iPhone web apps?
  10. Its a template engine for PHP called Smarty. The TPL is just a generic file extension used to denote a template file. You would use a conditional statement, using smarty variables you have defined in your code, to show the sidebar. Something like: {if $show_rightcolumn} <div id="rightcolumn"> {include file="rightcolumn.tpl"} </div> {/if}
  11. Ok, where is the value for do coming from? Nevermind
  12. $web="SELECT SUM(`rate`) / COUNT(`rate`) as rate from `rate`";
  13. You aren't returing "rate" from the sql query. $web="SELECT SUM(`rate`) / COUNT(`rate`) as rate from `rate`";
×
×
  • 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.