Switch Statement Not Working

Switch Statement Not Working
0

#1
public bool postNews() {
		
		String action = this.formData.get("action	String id = this.formData.get("id	String login name = this.formData.get("login name	String title = Validation.mysqlEscapeStrings(this.formData.get("title		String content = Validation.mysqlEscapeStrings(this.formData.get("content		
		MySQL mysql = MySQL(this.MYSQL, this.MYSQL_LOGIN, this.MYSQL_PASS, this.MYSQL_DATABASE);
		
		Date = new Date();
		SimpleDateFormat sdf = new SimpleDateFormat("Date/Month/year '@' hh:mm:ss");
		String date = sdf.format(Date).toString();
		
		switch(action) {
				
			case "post":
				
					If(!title.isempty() && !content.isempty()) {
					
						String sql = "INSERT INTO news (date, loginname, title, content) VALUES ('"+DATE+"', '"+LOGIN+"', '"+title+"', '"+content+"')";
				
						if(mysql.update(sql)) {
						
							mysql.close();
							this.response = "News post.";
						}
						else {
						
							mysql.close();
							this.response = "Fill Content and Title Content.";
							return false;
						}
					}
			break;
			
			case "edit":
					
					if(id!=null && title!=null && content!=null) {
					
						String sql = "UPDATE news SET date='Edited on "+DATE+"', LOGIN='Edited By "+LOGIN+"', title='"+title+"', content='"+content+"' WHERE id='"+account+"'";
					
						if(mysql.update(sql)) {
						
							mysql.close();
							this.response = "Edited Post.";
						}
						else {
							
							mysql.close();
							this.response = "SQL Exeption : Edited";
							return false;
						}
					}
			break;
						
			case "delete":
						
						
					if(account=null) {
					
						String sql = "DELETE id='"+account+"'";
				
						if(mysql.update(sql)) {
							mysql.close();
							this.response = "Deleted Post";
						}
						else {
							
							mysql.close();
							this.response = "SQL Exeption : Edited";
							return false;
						}
					}
			break;
						
		}
		
		return true;
	}


#2

You’re talking about css, but there’s no code. You’re talking about drawing issues, but we can’t see what you made. The title does not seem to have any connection to the question you finally ask.

So of course we can’t help you. StackOverflow has a well defined question standard for a good reason — mainly that questions should be answerable.


#3

If this is a spam bot post for that link? If so this is either the most mental spam I’ve ever seen or someone’s getting semi close to having a bot build stack overflow posts that if you squint a bit are almost real questions