NameSilo

How'd They Do That? Simple PHP question

SpaceshipSpaceship
Watch

MCDomains

DomainSeeking.comVIP Member
Impact
44
One of the NP'ers has a website listing their domains :
http://www.expireddomainspy.com/

I want to setup a similar website and I noticed the use of PHP with the index.php and linking to all the domains & categories through that index.php.

Can someone guide me to a tutorial or book that will show me how to organize links and categories like this w/PHP?

Thank you@!
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable Domains โ€” AI StorefrontUnstoppable Domains โ€” AI Storefront
0
•••
for php tutorials best is to go to sitepoint.com and proceed to the php section over there .... you'll find lots of articles. to get started read some elementary tutorials written by someone called "Kevin Yank".
basically the use of php in the example above is to simplify the management of categories and links and place them in a database so that you can then issue queries to the database programmatically via PHP scripts instead of digging into html every time you need to add, update, remove any of the links and/or categories....
 
0
•••
I have found the php book for dummies and other similar, step by step, books to be very helpful. The books are around $30 but you will learn from the most simple to advanced in weeks. Also, it is a quick reference if you ever need it in the future.

Hope this helps,
 
0
•••
i cant recommend sitepoint php books highly enough. They're absolute top notch. you can even download a few chapters and learn from them ... and if you like what you see, you can then make a purchase via paypal...
http://www.sitepoint.com/books/
 
0
•••
MCDomains said:
One of the NP'ers has a website listing their domains :
http://www.expireddomainspy.com/

I want to setup a similar website and I noticed the use of PHP with the index.php and linking to all the domains & categories through that index.php.

Can someone guide me to a tutorial or book that will show me how to organize links and categories like this w/PHP?

Thank you@!

The website you quoted as an example runs a script I authored called Domain Seller Pro

I'm not sure what the question is, but the PHP technique you're asking about is basic PHP. You can serve as much different content you want from a single PHP file.

For example, an index.php:

PHP:
<html>
<head>
<title>My site</title>
</head>
<body>
Welcome to my site!  <br><Br>

<?
if ($show=="categories") {

?>

<p>this is my category list</p>

<?
}
elseif ($show =="contact") {
?>
<p>this is my contact page</p>
<? 
}
else { 
?>
This is my home page.  Because the show variable wasn't defined.  
<? } ?>
</body>
</html>

If you visited index.php?show=categories it would show the category info. If you visited index.php?show=contact it would show the contact page, etc.

Hope this helps, but if not, please re-ask your question.

RJ
 
1
•••
Look for a bookstore called "Foozles" (link below) as they sell remanded books and I picked up a bunch of books for like $5-10 each with $50+ list prices. Everything from ASP to Visual Basic and then some.

http://www.book-warehouse.com/
 
0
•••
-RJ- said:
The website you quoted as an example runs a script I authored called Domain Seller Pro

I'm not sure what the question is, but the PHP technique you're asking about is basic PHP. You can serve as much different content you want from a single PHP file.

For example, an index.php:

PHP:
<html>
<head>
<title>My site</title>
</head>
<body>
Welcome to my site!  <br><Br>

<?
if ($show=="categories") {

?>

<p>this is my category list</p>

<?
}
elseif ($show =="contact") {
?>
<p>this is my contact page</p>
<? 
}
else { 
?>
This is my home page.  Because the show variable wasn't defined.  
<? } ?>
</body>
</html>

If you visited index.php?show=categories it would show the category info. If you visited index.php?show=contact it would show the contact page, etc.

Hope this helps, but if not, please re-ask your question.

RJ
Your missing the

PHP:
<?php
$show = $_GET['show'];
?>
Part that should be before the if code.
 
0
•••
jmweb said:
Your missing the

PHP:
<?php
$show = $_GET['show'];
?>
Part that should be before the if code.
It doesn't have to be. PHP recognizes the variable from the address and automatically makes $show a variable in the script. It works similar to posting variables in POST.

-Steve
 
0
•••
Thank you for all the help everyone!
 
0
•••
stscac said:
It doesn't have to be. PHP recognizes the variable from the address and automatically makes $show a variable in the script. It works similar to posting variables in POST.

-Steve
Not with register_globals set to off which is php's default setting, and the recommended setting. You should always define the variable like jmweb said.
 
0
•••
To get technical, I left out a lot. It was just an example. ;)
 
0
•••
CatchedCatched
Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back