All pastes #180512 Raw Edit

Unnamed

public text v1 · immutable
#180512 ·published 2006-09-23 08:18 UTC
rendered paste body
	  <?php
		  $bname = $_POST["bname"];
		  $cname = $_POST["cname"];
		  $industry = $_POST["industry"];
		  $technologies = $_POST["technologies"];
		  $url = $_POST["url"];
		  $description = $_POST["description"];
		  $fail = FALSE;

		        if (empty('bname'){
		  		echo "Please enter a business name";
				$fail = TRUE;
			}
			if (empty('cname'){
				echo " Please enter a client's name";
				$fail = TRUE;
			}
			if (empty('technologies'){
				echo "Please enter the technologies used in this project";
				$fail = TRUE;
			}
			if (empty('description'){
				echo "Please enter a description for the project";
				$fail = TRUE;
			}

			if(!$fail){
			$result = mysql_query("INSERT INTO `jswebco_portfolio` VALUES ('$bname','$cname','$industry','$technologies', '$url', '$description')");
			}

			if ($result) {
				echo "Client been added to the portfolio";
			} else {
				echo "Client has not been added to the portfolio due to an error";
			}
		  ?>
				echo "Please enter the technologies used in this project";
			}
			if (empty('description'){
				echo "Please enter a description for the project";
			}

			$result = mysql_query INSERT INTO `jswebco_portfolio` VALUES ('$bname','$cname','$industry','$technologies', '$url', '$description')
			}
			if ($result) {
				echo "Client been added to the portfolio";
			} else {
				echo "Client has not been added to the portfolio due to an error";
			}
		  ?>