Unstoppable Domains

Good project to better my Php skills?

Spacemail by SpaceshipSpacemail by Spaceship
Watch
Impact
11
What would be a good project to better my php skills? Im new at php and finish coding a simple script at: http://www.netsnatch.com/script (which checks to see if the entered domain contains a valid license)

I dont think im ready with mysql, as most of the mysql information in the above script was copied from other scripts i bought.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable DomainsUnstoppable Domains
http://www.netsnatch.com/script/

Doesn't work. :|

MySQL basically has 3 commands (insert, select, update; the others aren't used as much) that you need to know. It isn't hard at all. :)
 
0
•••
im working on making the script do more right now so it may give errors at times.

The things im not understanding right now about mysql is
mysql_query
mysql_fletch_array
etc.


Edit:

How can i get the number in a row in the database?

Code:
<?
$query = "SELECT downloads FROM counter WHERE id='1'";
$result = mysql_query($query);
$myrecord = mysql_fetch_row($result);

echo''.$myrecord.'';
?>

I have that, i want it to show the number in the 'downloads' column that has an id of 1, but all it does it show 'Array'.
 
Last edited:
0
•••
i would use mysql_fetch_array().
 
0
•••
Use mysql_fetch_array instead of mysql_fetch_row.

I don't know why you are doing echo '', since the '' doesn't do anything.

$myrecord is an array with the row you got from the database. If you do mysql_fetch_array instead of mysql_fetch_row, you can do $myrecord['something'], where something is the name of the column in the database.
 
0
•••
i tried using mysql_fetch_array() but it still showed array.
 
0
•••
You can't echo an array. Try print_r($myrecord) with mysql_fetch_array
 
0
•••
PHP:
<?
$query = "SELECT downloads FROM counter WHERE id='1'";
$result = mysql_query($query);
$myrecord = mysql_fetch_row($result);

echo $myrecord['0'];
?>

Should work.

Flubb.
 
0
•••
thanks flubber, works.
 
0
•••
Dynadot — .com Registration $8.99Dynadot — .com Registration $8.99

We're social

Unstoppable Domains
Domain Recover
NameMaxi - Your Domain Has Buyers
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back