Limelight Forums

Full Version: HTML / CSS / PHP / SQL
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Ah, no it doesnt do that.

You can install Emmet though. div*5>p{$} = 5 divs with a p tag with the current numbet in it.
(Mar 8, 2016, 09:47 AM)WildDorito Wrote: [ -> ]PHP (the worst language in my life)

</3

I do too much php :3 gud with sql and html5 and css
(Mar 8, 2016, 01:30 PM)Cameron Wrote: [ -> ]
(Mar 8, 2016, 09:47 AM)WildDorito Wrote: [ -> ]PHP (the worst language in my life)

I like PHP Sad

Im with u, WildDorito = pure evil xD
Firstly, whenever making a site try to make it responsive so use % instead of px where you can.

Secondly Sublime Text FTW:
Just a snapshot of a project I'm working on
HTML:
[Image: nnmoIJx.png]

PHP:
[Image: KgotGx2.png]
I've never had any luck using Dreamweaver, I just usually use plain old Notepad (that's how the entire LL homepage was made)
,I still dont understand how you live...
My brilliant PHP skills:
(Mar 9, 2016, 11:46 PM)WildDorito Wrote: [ -> ]My brilliant PHP skills:
[spoiler="Tongue"]
<?php
$name = "Noble";
$software = "Notepad";
$sql = mysql_query("SELECT * FROM developers WHERE name = '$name' and software = '$software'");
$sqlcheck = mysql_num_rows($sql);
if ($sqlcheck == "1") {
echo ("Error: 404 Tongue ");
$life = "0";
} else {
echo ("OK");
$life = "1";
}
?>
[/spoiler]

Wheres the PDO </3
u just keep making me cri even more just stabbit :C
EDIT: On a serious note 1. Dont use stock mysql its so vulnerable and 2. That statement is vulnerable to SQL Injection rip specifically here: 
PHP Code:
SELECT FROM developers WHERE name '$name' and software '$software' 

if you used pdo you could do:
PHP Code:
$sql $conn->prepare("SELECT * FROM developers WHERE name=:name and software=:software");
$sql->bindParam(":name"$name);
$sql->bindParam(":software"$software);
$sql->execute(); 

Eh read up on PDO also $conn needs to be changed to whatever this is:

$conn = new PDO("mysql:host=" . $servername . ";dbname=". $dbname, $username, $password);

This should work, made it now, read up on PDO (Stands for PHP Data Objects if I remember correctly) its really good Tongue
NEVER USE MySQL alone, use either MySQLi or PDO!!!! 
Also never used dreamweaver, I might take a look if I get time but been super super busy lately trying to push out a beta version of a massive script I been working on in PHP and got too many tests :C fucking school bombarding us with tests.
grrrrrr
i know someone who writes code in microsoft word
(Mar 10, 2016, 12:19 AM)goigle Wrote: [ -> ]i know someone who writes code in microsoft word

yeye dont we all
Is mixed HTML/PHP still a thing these days?
Come on guys. Get a proper template engine and go for it.
Bind tpl-vars inside your php-file and let the engine render it for ya.
Your code will look more organized and structured. This way Webdesigners don't have to mess with your PHP-Code in a template.
Can even have it cached serverside etc.

I recommend Smarty and Twig for PHP.
Good engine for Node is jade.
(Mar 9, 2016, 11:56 PM)A Simple Waffle Wrote: [ -> ]Wheres the PDO </3
u just keep making me cri even more just stabbit :C
EDIT: On a serious note 1. Dont use stock mysql its so vulnerable and 2. That statement is vulnerable to SQL Injection rip specifically here: 
PHP Code:
SELECT FROM developers WHERE name '$name' and software '$software' 

if you used pdo you could do:
PHP Code:
$sql $conn->prepare("SELECT * FROM developers WHERE name=:name and software=:software");
$sql->bindParam(":name"$name);
$sql->bindParam(":software"$software);
$sql->execute(); 

Eh read up on PDO also $conn needs to be changed to whatever this is:

$conn = new PDO("mysql:host=" . $servername . ";dbname=". $dbname, $username, $password);

This should work, made it now, read up on PDO (Stands for PHP Data Objects if I remember correctly) its really good Tongue
NEVER USE MySQL alone, use either MySQLi or PDO!!!! 

I have tried to use MySQLi with limited success. I'll try PDO when I get home, school has blocked FTP connections Sad
[html]
im a hacker
[/html]
I am amazed that you used original notepad to make Limelights page....... My mind = blown
Pages: 1 2 3