Jump to content
Killersites Forums

Ultra

Member
  • Posts

    13
  • Joined

  • Last visited

Ultra's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Mmkay. What exactly does that do? Only allow A-Z 0-1 and stuff? And should I switch the '$data' with what I use as the variable for the posts?
  2. Maybe.. Think not allowing forward slashes would get rid of them? I'm not sure exactly what that is, but it would not allow certain characters to be posted. I'll look up on Google and see if that works.
  3. My site has a place where users can post comments. For some reason, whenever someone posts a single quote ['], it puts a forward slash in front of the quote. I was wondering if there was a way to get around that, like a str_ireplace(); function. I tried it, and you can't do it like this: $Comment = str_ireplace("\'", "'", $Comment); Now, due to the forum style, it makes it hard to see what I posted. With spaces: $Comment = str_ireplace(" \' ", " ' ", $Comment);
  4. Er... Can you/someone explain to me what he/she means? I'm no coding expert, started not too long ago. Heck, I don't get what you mean by: 'Set a counter' and 'When the counter is at 5, reset the counter, end the current row and then start a new one.'. I only get the loop part, but just barely. ._. Edit: Now that I look at it and think, I actually sort of get it. Would I have to set up a variable, and an if statement, saying: 'if($counter=5) $counter = 0', or something similar?
  5. I was wondering if it was possible to get something from a Database [$result102 = mysql_query("select * from $table WHERE Owner_Id= '$iD' AND Slot= 'Box' order by Name asc ", $link)], use a mysql fetch array [while ($qry = mysql_fetch_array($result102))], post them with the $qry variable, and have it so that after 5 posts, it makes a new table row. I'm trying to make a list, and submit 5 things from the DB, then have it set a new table row so it doesn't mess up the screen.
  6. Ultra

    Error with no meaning.

    Nvm, it's something with the Password. Your passwords did not match. So, it's obviously something with the code that means the passwords must match, because when I enter the password, they match.
  7. Ultra

    Error with no meaning.

    Ah, okay. It's something to do with line 3, I'll look into it. $Register_Connection = mysql_connect('mysql2.freehostia.com', 'jefdur3_Users', '***'); That's the line with the error, in case anyone notices anything, because everything matches the Db and the Table. Error = Table 'jefdur3_Users.users' doesn't exist Newest Error, and Idk what it means, because Idk where I put the table. In fact, are you supposed to specify the table?
  8. Ultra

    Error with no meaning.

    Now, where exactly would that be? $Register_Connection = mysql_connect('mysql2.freehostia.com', 'jefdur3_Users', '***'); or $Select_Db = mysql_select_db('jefdur3_Users'); I like to get all my facts before fixing something.
  9. Ultra

    Error with no meaning.

    So, what exactly do you mean? The Table on the DB might have a different name than that of what I put, or it has different caps, and such?
  10. Ultra

    Error with no meaning.

    Okay, then there's: Table 'jefdur3_Users.users' doesn't exist After the other thing is fixed. I'm guessing that I misnamed something.
  11. The code is as following: <?php $Register_Connection = mysql_connect('mysql2.freehostia.com', 'jefdur3_Users', '***'); if (!$Register_Connection) { die('Could not connect: ' . mysql_error()); } $Select_Db = mysql_select_db('jefdur3_Users'); if (!$Select_Db) { die('Could not find DataBase: ' . mysql_error()); // checks if the username is in use if (!get_magic_quotes_gpc()) { $_POST['Username'] = addslashes($_POST['Username']); } $usercheck = $_POST['Username']; $check = mysql_query("SELECT username FROM users WHERE username = '$usercheck'") or die(mysql_error()); $check2 = mysql_num_rows($check); //if the name exists it gives an error if ($check2 != 0) { die('Sorry, the Username '.$_POST['Username'].' is already in use.'); } // this makes sure both passwords entered match if ($_POST['Password'] != $_POST['Confirm Password']) { die('Your passwords did not match. '); } mysql_close($Register_Connection); echo 'You may now Login' . ' '; ?> Yet the error is as following: Parse error: parse error, unexpected $ in /home/www/thepokeplasmarpg.freehostia.com/insert.php on line 44
×
×
  • Create New...