Raised This Month: $51 Target: $400
 12% 

Html & Php


Post New Thread Reply   
 
Thread Tools Display Modes
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-09-2015 , 22:26   Re: Html & Php
Reply With Quote #11

Quote:
Originally Posted by ^SmileY View Post
fysiks lammer? LAWL man is a simple question !!!!1!1!1!1!!
Some simple questions accurately imply laziness as was proven here.


Quote:
Originally Posted by Jhob94 View Post
I just did this:
PHP Code:
...

$conn mysql_connect($Host$User$Password);
... 
Note regarding mysql_connect() and related functions:

http://php.net/manual/en/intro.mysql.php
Quote:
This extension is deprecated as of PHP 5.5.0, and is not recommended for writing new code as it will be removed in the future. Instead, either the mysqli or PDO_MySQL extension should be used. See also the MySQL API Overview for further help while choosing a MySQL API.
__________________

Last edited by fysiks; 05-09-2015 at 22:37.
fysiks is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 05-10-2015 , 02:39   Re: Html & Php
Reply With Quote #12

Quote:
Originally Posted by fysiks View Post
Some simple questions accurately imply laziness as was proven here.




Note regarding mysql_connect() and related functions:

http://php.net/manual/en/intro.mysql.php
PHP's manual designer should be whacked. Its been deprecated for far longer than that... since PHP 5.1.0 I think. That was released nearly 10 year ago.

mysqli showed up to replace it in the PHP4 days.

PDO became part of PHP standard in 5.1.0 (it was available as an extension for 5.0.x) and should be used in preference to the other DB libraries whenever possible.

Here's a PDO tutorial published a few years ago.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
xEhsaan
Member
Join Date: Mar 2015
Location: Isfahan, Iran
Old 05-13-2015 , 12:54   Re: Html & Php
Reply With Quote #13

Mmmm, I think you need to learn PHP basics, if you did, did it again.

1. PHP isn't like AMX Mod X environment, You don't have to use sprintf() function everytime or use "%s" for echoing string. You can do it directly.

2. As Powerlord said, You should use PDO for more speed and security. Here's a newer and updated tutorial for PDO. You can use ORMs if you want like RedBean (you'll need higher skill for php to use this, but anyway redbeanphp is more awesome).

3. Don't use <?= tag, it's deprecated.
__________________
* Wait for something awesome...
* AMX Mod X Plugin Translation Repository [Paused Temporarily]
* Knife Deathmatch Shop
* Knife CFG Detector
* Looking for an idea...
xEhsaan is offline
Send a message via Skype™ to xEhsaan
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-13-2015 , 20:16   Re: Html & Php
Reply With Quote #14

Quote:
Originally Posted by xEhsaan View Post
3. Don't use <?= tag, it's deprecated.
Wow, it must have been deprecated a very long time ago because I've been programming in PHP for nearly 15 years and I've never seen that syntax.
__________________
fysiks is offline
xEhsaan
Member
Join Date: Mar 2015
Location: Isfahan, Iran
Old 05-13-2015 , 23:10   Re: Html & Php
Reply With Quote #15

Quote:
Originally Posted by fysiks View Post
Wow, it must have been deprecated a very long time ago because I've been programming in PHP for nearly 15 years and I've never seen that syntax.
I've seen it before, but not in official PHP documentation, I was searching the whole PHP documentation for this, didn't find anything about <?= tag.
I guess it's deprecated, punished, fired then removed from documentation
__________________
* Wait for something awesome...
* AMX Mod X Plugin Translation Repository [Paused Temporarily]
* Knife Deathmatch Shop
* Knife CFG Detector
* Looking for an idea...
xEhsaan is offline
Send a message via Skype™ to xEhsaan
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:37.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode