Jump to content

Recommended Posts

Posted

Hello guys. As my first tutorial i thought to share with you some of my php knowledges!

So here we go :).

basicly to create a PHP website we need a notepad , a notepad++ or a Dreamweaver (or any other programm you desire).

Just to know PHP well it's a language based on HTML and its tags. (mostly .. with some addons)

Some main reasons to start a PHP website are: It's protection, PHP websites can't have their source code viewed by the explorer or get riped (many times the Ripper** Programm is downloading the PHP files as HTML..). It's eassines.., easy to learn eassy to code.. like HTML.

 

Now to get started you need to open your editing programm.

Now for a basic knowledge PHP codes are usually placed in a

<?PHP  ?>

tag. Every word or code that gets typed in those tags  is considered as source code.

Now a basic code is this:

<?php $title = "Hello!"; ?>

Now if you type in a page.

<?php require 'configfile.php'; ?> <title><?php echo $title?></title>

it will type the text you typed in the php config file as page title.

hm.. what else.. all the other tags are exactly like HTML.

now if you want to get INTO PHP you need to learn some things.

something i took out: What You Type Is What You Get (WYTIWYG). PHP is mostly logic thing.

Now for example if you want to connect to a database you need a source code writen in PHP.

<?php 
$dbuser = "user";
$dbpass = "pass";
$dbhost = "localhost";
$dbname = "database";

$mysql_connect['$dbuser','$dbpass','$dbhost','$dbname'] or die(mysql_error);
?>

that's the code for a propper mysql database connection through PHP.

Now to type a text that will be seen somewhere in the website in the config file you will place the text in "..".

Every code you end MUST ALWAYS finish with a ";".

 

Hope i helped even a little :)

(Sorry if I posted a topic that was already posted by somebody else.. i didn't have the time to search :))

 

Best Regardz,

             Sinova™

  • 1 month later...
Posted

really nice guide man it really helped me

but please make a change ;)

at the mysql_connect

delete all the above

and keep the $mysql_connect

after the ; at the end

type

mysql_select_db("mydb") or die(mysql_error());

 

then it will look like this

 

<?php

$mysql_connect["localhost","root","password of mysql if have"] or die(mysql_error());

mysql_select_db("mydb") or die(mysql_error());

?>

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • We've added 5% discounts for bulk purchases of Google accounts for orders of 300 or more, and 10% for orders of 500 or more. The discount is applied automatically when you place your order! The discount is indicated in the product title and description for each category.  
    • 🎄 CHRISTMAS EVENT 🎄   ‼️ Information and details: https://forum.l2harbor.com/threads/rozhdestvenskie-xlopoty-christmas-chores.9430/post-171464
    • METATG.ORG Direct Telegram Service Provider A bonus of +7% on every order! *We add 7% more followers than your ordered amount to proactively cover potential drops and guarantee you an honest result." Telegram Followers - Price per 1000 SUBSCRIBERS Subscribers 3 days - $0.10 ~ 8 RUB Subscribers. Daily Completion: 200,000,000 Subscribers 7 days - $0.17 ~ 13.6 RUB Subscribers. Daily Completion: 200,000,000 Subscribers 14 days - $0.20 ~ 16 RUB Subscribers. Daily Completion: 200,000,000 Subscribers 30 days - $0.30 ~ 24 RUB Subscribers. Daily Completion: 200,000,000 Subscribers 60 days - $0.40 ~ 32 RUB Subscribers, 14-day guarantee. Daily Completion: 200,000,000 Subscribers 90 days (Super Fast) - $0.50 ~ 40 RUB Subscribers, 14-day guarantee. Daily Completion: 200,000,000 Subscribers 120 days (Super Fast) - $0.60 ~ 48 RUB Subscribers, 14-day guarantee. Daily Completion: 200,000,000 Subscribers Lifetime (Super Fast) - $0.70 ~ 56 RUB Lifetime Subscribers. 14-day guarantee. Daily Completion: 200,000,000 Telegram Services - Price per 1000 Post Views - $0.06 ~ 5 RUB Reactions - $0.08 ~ 6.5 RUB Bot Starts - $0.10 ~ 8 RUB Bot Starts with referrals - $0.15 ~ 12 RUB DISCOUNTS and CASHBACK for large volumes Direct Supplier. We work from our own accounts with our own software! High execution speed. Multiple payment methods. We work 24/7! Additional discounts are discussed for volumes starting from $1000 per day. SUPPORT 24/7 - TELEGRAM WEBSITE 24/7 - METATG.ORG
    • Added: a brand-new default dashboard template. You can now add multiple game/login server builds. Full support for running both PTS & L2J servers simultaneously, with switching between them. Payment systems: added OmegaPay and Pally (new PayPal-style API). Account history now stores everything: donations, items delivered to characters, referrals, transfers between game accounts, and coin transfers to another master account. Personal Promo Code System: you can create a promo code and assign it to a user or promoter. When donating, a player can enter this promo code to receive bonus coins, and the promo code owner also receives a bonus — all fully configurable in the admin panel.     Look demo site: demo
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock