Jump to content

ahsesino

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Everything posted by ahsesino

  1. Thanks for your reply AyKay47; What Im trying to do is display the current poster avatar next to his post. For that I need to connect to DB and select from two tables three rows. The reason I have to do it this way is because when someone post something new it the new post gets stored in the latest_post table and the avatars are located in the profile table. Tables --------- 1.latest_post 2.profile I need to select "nick","avatar_img" from table "profile" and select "person" FROM table "latest_post" from there I need to make latest_post.person = profile.nick AND make profile.nick = profile.avatar_img to display avatar in box. The reason i use $query is to echo the result. I hope my explanation makes sense.
  2. Hello guys; I posted this thread a couple of days ago in the PHP code section thinking there was something wrong with my php code. So I realized it was in the wrong section, the issue has to be in mysql query. The code is below; when I run the query on "myphpadmin" my result is empty and on the page I want this query to apear the result is a capital S. If someone could help me out I would really appreciate it. <?php $query = ("SELECT nick, avatar_img, person FROM latest_post, profile WHERE latest_post.person = profile.nick AND profile.nick = profile.avatar_img WHERE profile.avatar_img='$avatar_img'"); echo $query[$avatar_img]; ?>
  3. Do what nano said, go to http://css3pie.com/ and download it. open the file and keep only the file named PIE.htc. Save this file in the same folder your css file is. now open your css file and go to where you want the rounded corners and type the following code: -moz-border-radius-topright:10px; -moz-border-radius-topleft:10px; -webkit-border-top-left-radius:10px; -webkit-border-top-right-radius:10px; border-top-right-radius:10px; border-top-left-radius:10px; border-bottom-right-radius:10px; border-bottom-left-radius:10px; behavior: url(PIE.htc); and thats it your done. enjoy.
  4. Here use this code @font-face { font-family: 'font'; src: url('media/fonts/font-webfont.eot?') , url('media/fonts/font-webfont.ttf') , url('media/fonts/font-webfont.woff') , url('media/fonts/font-webfont.svg'); } Explanation: your custom font needs to be declared -->font-family: 'font'; now if you want that font to be applied to a box this is what you do: #box { width; 0px; height: 0px; font-family:'font'; } now the box will use your custom font. enjoy.
  5. Hell again, I'm still banging my head trying to figure out the problem with my code, I did make some progress on it changing the query but the end result is not what I need. When echoing my query I should see the name of the avatar image but my result is an "S" below is the code I'm using: <?php $query = ("SELECT nick, avatar_img, person FROM latest_post, profile WHERE latest_post.person = profile.nick AND profile.nick = profile.avatar_img WHERE profile.avatar_img='$avatar_img'"); echo $query[$avatar_img]; ?>
  6. Thanks for your reply sasa but that didn't work. I probable didn't explain my self right. I'll try again. 1. I need from table (latest_post) $post_id,$person and from table (profile) I need $nick,$avatar_img 2. I need $post_id,$person = $nick 3. Finally echo the avatar_img for that $nick Thanks again guys.
  7. Hello guys, I'm trying to figure out how to display and image that is located in one table (profile) and make it correspond to a variable on another table (latest_post) to where you echo out the variable from the table(latest_post) and the image from table(profile) appears next to the post. any how here is my code: <?php $query = mysql_fetch_array(mysql_query("SELECT person FROM latest_post AND avatar_img FROM profile WHERE id FROM latest_post = id FROM profile ")); echo $query['avatar_img']; ?> Also when echoing out the query I only get the name of the image and not the image this is most likely because my image is stored in a different folder right? Thanks in advance, your help is much appreciated since I'm barely a beginner at php and MySQL.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.