rbxlmadx
Member
- Messages
- 32
- Reaction score
- 1
- Points
- 8
Lets say I have a link:
http://ww.google.com/ads?id=14
I want that 14 to be fetched from my database, so it would look like this in script:
<img src='http://www.google.com/ads?id=$fourteen'>
Now, it is not a php script, like this:
<?php
<img src='http://www.google.com/ads?id=$fourteen'>
?>
It is just the img without the <?php ?>
Anyway, I want that $fourteen from my database so I do this:
$four = mysql_query("SELECT four FROM days");
$fourteen = mysql_num_rows($four);
days is the table, four is located inside that table, and inside that it's number is 4, so when we have this link:
<img src='http://www.google.com/ads?ad=$fourteen'>
That $fourteen turns to 14. But this is not working in my script, there might be a few reasons like:
Not php: doesn't start with <?php and end with ?>
Not fetching right:
$four = mysql_query("SELECT four FROM days");
$fourteen = mysql_num_rows($four);
So... What am I doing wrong?
http://ww.google.com/ads?id=14
I want that 14 to be fetched from my database, so it would look like this in script:
<img src='http://www.google.com/ads?id=$fourteen'>
Now, it is not a php script, like this:
<?php
<img src='http://www.google.com/ads?id=$fourteen'>
?>
It is just the img without the <?php ?>
Anyway, I want that $fourteen from my database so I do this:
$four = mysql_query("SELECT four FROM days");
$fourteen = mysql_num_rows($four);
days is the table, four is located inside that table, and inside that it's number is 4, so when we have this link:
<img src='http://www.google.com/ads?ad=$fourteen'>
That $fourteen turns to 14. But this is not working in my script, there might be a few reasons like:
Not php: doesn't start with <?php and end with ?>
Not fetching right:
$four = mysql_query("SELECT four FROM days");
$fourteen = mysql_num_rows($four);
So... What am I doing wrong?