-
Re: [WEBSITE] Habbsite CMS released !
bisou580, go to a library borrow one, theres lots in my town library.
To start off, I am very good in php but you can add me on MSN if you want...
PHP Code:
<?php
include("config.php"); // config.php includes the mysql connection
include("func.php"); // any functions such as filepaths and etc
// Your talk starts here!
?>
another example of my work (this checks the URIReferer)
PHP Code:
<?php
include("refer.php")
$r = $_SERVER['HTTP_REFERER'];
if($r == $_1)
{
session_start();
$_SESSION['grant']=2; //sth like a cookie
}
elseif ($r == $_2)
{
session_start();
$_SESSION['grant']=2;
}
else
{
session_start();
$_SESSION['grant']=1;
echo "Not granted";
die(); //stops anymore code generating (including MySQL)
}
?>
-
Re: [WEBSITE] Habbsite CMS released !
You simply must have a config.php file with defined variables before it works
-
Re: [WEBSITE] Habbsite CMS released !
Quote:
Originally Posted by
syed1994
bisou580, go to a library borrow one, theres lots in my town library.
To start off, I am very good in php but you can add me on MSN if you want...
PHP Code:
<?php
include("config.php"); // config.php includes the mysql connection
include("func.php"); // any functions such as filepaths and etc
// Your talk starts here!
?>
another example of my work (this checks the URIReferer)
PHP Code:
<?php
include("refer.php")
$r = $_SERVER['HTTP_REFERER'];
if($r == $_1)
{
session_start();
$_SESSION['grant']=2; //sth like a cookie
}
elseif ($r == $_2)
{
session_start();
$_SESSION['grant']=2;
}
else
{
session_start();
$_SESSION['grant']=1;
echo "Not granted";
die(); //stops anymore code generating (including MySQL)
}
?>
I understand how php works, but i need an PHP code for catch the content of a column of a MySQL table. Then for cath the content (text) and view.
-
Re: [WEBSITE] Habbsite CMS released !
Quote:
Originally Posted by
bisou580
I understand how php works, but i need an PHP code for catch the content of a column of a MySQL table. Then for cath the content (text) and view.
select * from 'yowateva'
-
Re: [WEBSITE] Habbsite CMS released !
Ok I can do it, just a minute (need to refresh my brain).
PHP Code:
<?php
include("config.php");
$connect = mysql_connect($host,$user,$pass);
or
die('Error Message: ' . mysql_error());
mysql_select_db($db, $connect);
$data = mysql_query("SELECT * FROM content"); //select * from (table)
while($row = mysql_fetch_array($data))
{
echo $row['News'] .; //row of table
echo "<br />";
}
mysql_close($connect);
?>
Done!
-
Re: [WEBSITE] Habbsite CMS released !
in SELECT * FROM content
content is an column of an table -or- an table of the database ? Help !
And if i want view the content of the column "bloc1" of the table "pages_main" of database "habbsitecms" ? I don't say what modify for make this...
What is the code of "config.php" please ?
Thanks !
-
Re: [WEBSITE] Habbsite CMS released !
Is my code good (see above).
-
Re: [WEBSITE] Habbsite CMS released !
Quote:
Originally Posted by
syed1994
Is my code good (see above).
THANKS !!!!!!!!
I test !
and how to insert some text on a row via PHPMy Admin ? I'm lose...
-
Re: [WEBSITE] Habbsite CMS released !
Ooops I forget you need the config file!
PHP Code:
<?php
/*
MySQL Connextion
*/
$host = "localhost"
$user = "USERNAME FOR DB HERE"
$pass = "password"
$db = "database name"
?>
-
Re: [WEBSITE] Habbsite CMS released !
Quote:
Originally Posted by
syed1994
Ooops I forget you need the config file!
PHP Code:
<?php
/*
MySQL Connextion
*/
$host = "localhost"
$user = "USERNAME FOR DB HERE"
$pass = "password"
$db = "database name"
?>
Okay, i test, but result :
Quote:
Parse error: syntax error, unexpected T_LOGICAL_OR in C:\xampp\xampplite\htdocs\habbsitecms\20beta\view.php on line 4
And after erasing
Quote:
or
die('Error Message: ' . mysql_error());
I have this :
Quote:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\xampp\xampplite\htdocs\habbsitecms\20beta\view.php on line 9
tested with XAMPP (Apache and MySQL server)
-
Re: [WEBSITE] Habbsite CMS released !
PHP Code:
<?php
include("config.php");
$connect = mysql_connect($host,$user,$pass);
if (!$connect)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db($db, $connect);
$data = mysql_query("SELECT * FROM content"); //select * from (table)
while($row = mysql_fetch_array($data))
{
echo $row['News'] .; //row of table
echo "<br />";
}
mysql_close($connect);
?>
Ok, you make a table named content
then you make it with 2 fields named News and Test
Then put some data in!
-
Re: [WEBSITE] Habbsite CMS released !
Quote:
Originally Posted by
syed1994
Then put some data in!
Okay but in what field i need to enter the data i want ?
FieldTypeLength/Values1CollationAttributesNullDefault2ExtraCommentsMIME typeBrowser transformationTransformation options3
It's fields of phpMyAdmin
http://img153.imageshack.us/img153/1107/mysqlnn4.png
And for insert, for exemple, this data : "<p>helloworld</p>" on a row (here "bloc1") what is the type i need to have ? TEXT ? LONGTEXT ? BINARY ? I try to insert data in the "Lenght/Values" field but don't save...
Help meeeee Thanks a lot !
-
Re: [WEBSITE] Habbsite CMS released !
Ermmm.... you don't know how to use it.
Aw man!
-
Re: [WEBSITE] Habbsite CMS released !
Quote:
Originally Posted by
syed1994
Ermmm.... you don't know how to use it.
Aw man!
Yes i don't know how to use it.
Anybody knows how to ?
-
Re: [WEBSITE] Habbsite CMS released !
Quote:
Originally Posted by
jetgod
hahaha, thats so funnyy.... you need more than require config.php, stealer!
Dude u know more rofl >.>
Config.php for mysql
functions.php is for ?redirect= or ?go=
i dont have added the code because its a previeuw its dont a steal if you to lazy to make one just say
-------------------------------------------------------------------------------------------------------
http://www.habbocs.nl/userbar.png
-
Re: [WEBSITE] Habbsite CMS released !
Quote:
Originally Posted by
Xellios
Dude u know more rofl >.>
Config.php for mysql
functions.php is for ?redirect= or ?go=
i dont have added the code because its a previeuw its dont a steal if you to lazy to make one just say
-------------------------------------------------------------------------------------------------------
http://www.habbocs.nl/userbar.png
Yes, you do know that 'require' requires mroe than just thta! Thsi sin't c++, you know. Config and fucntions .php must exist ahnd have the variables defiend, etc.
-
Re: [WEBSITE] Habbsite CMS released !
Quote:
Originally Posted by
jetgod
Yes, you do know that 'require' requires mroe than just thta! Thsi sin't c++, you know. Config and fucntions .php must exist ahnd have the variables defiend, etc.
Dude, Listen if you are to noob to understand this >.>
Stupid noob sinds when we put mysql rows IN a .php file ;l ? ..
Lol if you want beat me add me on msn you can see in one of the posts
AND WHO SAYD THIS IS C++ :) ? .. C++ IS A REALLY ANOTHER CODELANGUAGE THAN PHP >.> nooblet your to stupid to stop YOUR PWNED >.>
-
Re: [WEBSITE] Habbsite CMS released !
Quote:
Originally Posted by
Xellios
Dude, Listen if you are to noob to understand this >.>
Stupid noob sinds when we put mysql rows IN a .php file ;l ? ..
Lol if you want beat me add me on msn you can see in one of the posts
AND WHO SAYD THIS IS C++ :) ? .. C++ IS A REALLY ANOTHER CODELANGUAGE THAN PHP >.> nooblet your to stupid to stop YOUR PWNED >.>
I did nto once say this was c++.
I was saying that you are confusing php with c++. Php's 'requrie' functin is completely different, you're basically thinking that it's a similiar to c++ header file, which is wrong.
And 'sinds when we put mysql rows IN a .php file '
that makes no sense. explain?
There wasn't even a war.......
-
Re: [WEBSITE] Habbsite CMS released !
-
Re: [WEBSITE] Habbsite CMS released !
-
Re: [WEBSITE] Habbsite CMS released !
Good Job with this release :). It's useful for those who don't know HTML. I just wish everyone could stop complaining... -_-. If you don't like it don't reply. If you don't like it don't download it. He made it so we don't need to spend more time on makng Templates and such. Thank you again. :) I like it.
-
Habbsite CMS pannel - Dutch language pack
Hey all!
The Dutch language pack is ready!
All you need to do is extract the files into the main directory.
Code:
http://rapidshare.com/files/29878198/Habbsite_CMS_-_Dutch_languagepack.rar
-
Re: [WEBSITE] Habbsite CMS released !
hey there! i'm a big time PHP coder if you would like help please give me a PM ^_^
-
Re: [WEBSITE] Habbsite CMS released !
Pretty good job, keep up the good work!
-
age
I intend to make this into a reaal cms....
when I haev the time, lulz.