Jump to content

Cal

Members
  • Posts

    67
  • Joined

  • Last visited

    Never

Everything posted by Cal

  1. the single quotes need to be slash'd fixed: echo ' <a href="#" onclick="slidedown_showHide(\'box2\');return false;">';
  2. Try: $body = " <br><hr><br> Username: $username <br> Name: $name <br> Email: $email <br> How Did You Finding Us: $findingus <br> Rss Yes Or No: $rssfield <br> Comments: $comments <br> ";
  3. hehe ` ` } There's two little alternate quote things, remove them.
  4. $success = mail($emailField , $emailSubject, $body, $headers); You haven't defned $body, that is why there is no content, maybe you wrote the wrong variable.
  5. Can you post the whole script.?
  6. mysql_query("INSERT INTO users (username,password,email) VALUES ('$username','$password','$email')") You're missing the semi-colon on the end of that line.
  7. Redarrow, yours still have a little mistake (the single quote is in a wrong place): Fixed here: <?php mysql_query("INSERT INTO results(user, movie, input, prediction, error) VALUES('" . mysql_real_escape_string($_POST['email']) ."' , '" .mysql_real_esape_string($Movies[$m]['title']) . "','" . mysql_real_esape_string($Movies[$m]["rating"]) . "','" . mysql_real_escape_string($result) . "','" . mysql_real_esape_string($err) . "' ) ") or die(mysql_error()); ?>
  8. <?php if($_POST['submit']){ if($_POST['username'] && $_POST['password']){ if(mysql_num_rows($data) == 1){ if($data2['active'] == 1){ if($data2['banned'] == 0){ }else{ $message = "You have been banned by an administrator."; } }else{ $message = "Your account is not activated, if you have just registered check your emails for an activation email."; } }else{ $message = "Incorrect username or password."; } }else{ $message = "Enter a username and password."; } } ?> I think it's best to code in a structure like that.
  9. Try this... if($_SERVER["SCRIPT_NAME"] == '/products/expitem.php') { It should work even with $_GET variables.
  10. It's very badly structured, I definitely wouldn't use it.
  11. Use round(); round([number], [decimalplaces])
  12. echo '<div id="',$row['arena'],'">';/ What diference do the commas have?
  13. echo "<div id='".$row['arena']."'>"; I'm pretty sure that'll work. Also, this line echo .$row['date']; needs no dot before the veriable, so use: echo $row['date'];
  14. Is it constantly there, even if you go to another website?
  15. Do you mean, it didn't refresh? Just press f5. Are you sure it's actually changing something in the file?
  16. As I said, mysql_num_rows does not fetch data, so $selitem and $selaps will just be the number of rows, to get some data use mysql_fetch_array(); like: $st = "SELECT * FROM aps WHERE name = '$name'"; $qr = mysql_query($st); $selaps = mysql_fetch_array($qr); $s = "SELECT * FROM items WHERE name = '$match[1]'"; $r = mysql_query($s); $selitem = mysql_fetch_array($r); $newaps = ($selaps['aps']+ $selitem['dvalue']);
  17. mysql_num_rows only returns the number of rows returned by the query, you want to be using mysql_fetch_assoc() or mysql_fetch_array().
  18. if you wanted to actualy get the contents of the file use: <label>Band Name <input name="save" type="text" id="save" value="<?php echo file_get_contents("/home/alport/public_html/".$_SESSION['s_username']."/text/name.txt"); ?>" /> </label>
  19. <label>Band Name <input name="save" type="text" id="save" value="<?php echo'/home/alport/public_html/".$_SESSION['s_username']."/text/name.txt'); ?>" /> </label> You started with single quotes then used double, use the same type: <label>Band Name <input name="save" type="text" id="save" value="<?php echo"/home/alport/public_html/".$_SESSION['s_username']."/text/name.txt"; ?>" /> </label>
  20. I would suggest using cookies to remember what the user has selected.
  21. the variable $ip actualy needs to be the visitors IP address, otherwise the comparisons are useless if the ip is set to one that passes it all. $ip = $_SERVER['REMOTE_ADDR'];
×
×
  • 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.