I am starting to freak out with my php codes because it is just a mess and i get an error when i close my php tag.

This php file is going to upload an image and set a name,description, and signature from the player, but i get this error code i am talking about, and can some one help me?
I have 3page of codes, and i wonder how i can make this mess to one file with one code,
I am very greatful for the answears I get.


In the last link from row 50-79 is the upload image script, how can I merge that to one code with the other links?

Best Regards

The file in the second link is broken, you're missing a closing bracket.

Hi there,

On http://pastebin.no/324c there was a } closing bracket missing at the end of the script, see code below.

Please remember to mark thread as solved if it works.



<?php class physic_gaming_profile { 
              var $host;        
			  var $username;        
			  var $password;        
			  var $db;       
			  function add_content($p) {
				                  $title = mysql_real_escape_string($p['title']);
								  $body = mysql_real_escape_string($p['body']);                
								  $signature = mysql_real_escape_string($p['signature']);                               
								  if(!$title || !$body ):                                               
								  echo "<p>The user needs a name!</p>";
								  echo "<p>It needs content in the body!</p>";                                
								  echo '<p><a href="add-user.php">Prøv Igjen!:)</a></p>';                        
								  $sql = "INSERT INTO cms_profile VALUES ('$title', '$body', '$signature')";                                 
								  $res = mysql_query($sql) or die(mysql_error());                                 
								  echo "User is saved";                        

Hi, got new error... Column count doesn't match value count at row 1

Your insert inserts three columns, and you probably have more in your table. You need to specify the three you want to fill before VALUES.

hi when i am adding its now i am getting error "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''User 1', 'hahahaha ', '2Hard2Kill')' at line 1"
But, it is possible that i make a owv title for the pictures and one table for the users? And get the id's to be synced?