Jump to content
  • Advertisement
Sign in to follow this  
sathenzar

PHP - Blank space holders

This topic is 5414 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hey, I'm trying making my admin panel and this is the first time I've tried to make a admin panel that creates tables and forum records, so obviously, I'm going to run into problems. Here's my code:
if($cforum_btn)
{
	$forum_id = str_replace(" ", "", $forum_id);
	$forum_id2 = str_replace($forum_id, $forum_id + "ID", $forum_id);
	$forum_title2 = str_replace(" ", "", $forum_title);
	$sql_2 = "INSERT INTO forums(forum_title, forum_title2, forum_desc, forum_id) VALUES('$ftitle', '$forum_title2', '$forum_desc', '$forum_id2')";
	if(!mysql_query($sql_2, $dbh))
	{
		die( "<center>Failed to create a new forum because: </center>". mymsql_error());
	}
	echo "Your outputs where: Forum title: $ftitle<br />Forum title2: $forum_title2<br />Forum ID: $forum_id2";
}

When I echo out the code, $forum_title2 and $forum_id2 are both empty, could someone tell me why? I don't understand. If someone could help me out I'd appreciate it. If I need to be more specific about somthing please let me know also, thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
hey, sorry to create a waste of a thread. I figured out my problem. I needed to change the + "ID" to . "ID". Thanks for your help EvilSteve. I appreciate it. The values where created by a forum I made.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!