Search found 8 matches

by Lureren
Thu Jan 07, 2010 10:58 am
Forum: PHP - Theory and Design
Topic: Should i use echo to construct HTML?
Replies: 4
Views: 1164

Should i use echo to construct HTML?

Hi

I have a simple question about using echo/print. Should i use echo/print to construct HTML-code?

E.g.:

Code: Select all

$name = $_GET[name];
 
echo "<p>" . $name . "</p>";

Code: Select all

$name = $_GET[name];
 
<p><?php echo $name; ?></p>
Which is best, and why?
by Lureren
Fri Aug 07, 2009 10:01 am
Forum: PHP - Code
Topic: MySQL-output is case-sensitive?
Replies: 15
Views: 349

Re: MySQL-output is case-sensitive?

I removed the "== $_POST["username"]" and now it works!

Thanks alot!
by Lureren
Fri Aug 07, 2009 9:36 am
Forum: PHP - Code
Topic: MySQL-output is case-sensitive?
Replies: 15
Views: 349

Re: MySQL-output is case-sensitive?

$postUsername = $_POST["username"]; $sql = mysql_query("SELECT username,password FROM user WHERE username = '$postUsername'"); $sqlArray = mysql_fetch_array($sql);   if($sqlArray["username"] == $_POST["username"] AND $sqlArray["password"] == md5($_P...
by Lureren
Fri Aug 07, 2009 9:01 am
Forum: PHP - Code
Topic: MySQL-output is case-sensitive?
Replies: 15
Views: 349

Re: MySQL-output is case-sensitive?

The webpage is using ISO-8859-1 and in the table ive tried latin1_danish_ci, latin1_swedish_ci, latin1_general_ci, utf8_general_ci and utf8_danish_ci.
by Lureren
Fri Aug 07, 2009 8:42 am
Forum: PHP - Code
Topic: MySQL-output is case-sensitive?
Replies: 15
Views: 349

Re: MySQL-output is case-sensitive?

Ive now tried som different charactersets, but none of them works.

Any suggestions?
by Lureren
Fri Aug 07, 2009 8:29 am
Forum: PHP - Code
Topic: MySQL-output is case-sensitive?
Replies: 15
Views: 349

Re: MySQL-output is case-sensitive?

Ill give it a try. Thank you ;)
by Lureren
Fri Aug 07, 2009 8:26 am
Forum: PHP - Code
Topic: MySQL-output is case-sensitive?
Replies: 15
Views: 349

Re: MySQL-output is case-sensitive?

So basicly i just change the characterset in the database?
by Lureren
Fri Aug 07, 2009 8:11 am
Forum: PHP - Code
Topic: MySQL-output is case-sensitive?
Replies: 15
Views: 349

MySQL-output is case-sensitive?

Hello! Atm. im building a new website with a adminpanel and of course a login-system. But when i enter the username it's in case-sensivity, which i dont want. Eg. "Lureren" works because that is how its entered in the database, while "lureren" doesnt work? How can i change that? ...