I don't know, how registering Variables work...
Some example Code:
PHP Code:
$abfrage = "SELECT * FROM sms WHERE uID = $userID";
$ergebnis = mysql_query($abfrage);
$x = 0;
while($row = mysql_fetch_object($ergebnis))
{
$x = $x + 1;
}
$sent = $x;
$x = 5 - $sent;
echo "Du hast noch <b>$x</b> Kostenlose SMS für heute übrig.<br>";
Sorry for the german. I hope you can translate it. I have many like this. That would be much Variables...