GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Php question - simple shit... (https://gfy.com/showthread.php?t=466616)

Jace 05-11-2005 11:56 PM

Php question - simple shit...
 
i need to insert an image into this page, and I know little about php

why when I put this in
<img src='images/CategoriesBox/header.jpg' width='150' height='15' border='0'>

does it give me a

Parse error: parse error, unexpected '<'

error?

how can I write that in php so the image shows up?

newbreed 05-11-2005 11:59 PM

Don't you need another " ' " before your last " ?

newbreed 05-12-2005 12:01 AM

Nevermind, I may be wrong on that.

What script are you trying to play with?

Jace 05-12-2005 12:02 AM

Quote:

Originally Posted by newbreed
Don't you need another " ' " before your last " ?

there are no " in there, that fucks it all up, i have to use '

the code works fine outside the <?php tag, but within it parsese it wrong

Jace 05-12-2005 12:03 AM

Quote:

Originally Posted by newbreed
Nevermind, I may be wrong on that.

What script are you trying to play with?

oscommerce...customizing it....trying graphical infobox headers for the first time

broke 05-12-2005 12:03 AM

Paste more of the code... I think it's carry over from the line above.

echo "<img src='images/CategoriesBox/header.jpg' width='150' height='15' border='0'>";

Should work just fine.

newbreed 05-12-2005 12:04 AM

Quote:

Originally Posted by JaceXXX
there are no " in there, that fucks it all up, i have to use '

the code works fine outside the <?php tag, but within it parsese it wrong


Paste the whole php tag

Jace 05-12-2005 12:05 AM

Code:

<!-- categories //-->
          <tr>
            <td>
<?php
<img src='images/CategoriesBox/header.jpg' width='150' height='15' border='0'>
  $categories_string = '';

  $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . $languages_id ."' order by sort_order, cd.categories_name");
  while ($categories = tep_db_fetch_array($categories_query))  {
    $foo[$categories['categories_id']] = array(
                                        'name' => $categories['categories_name'],
                                        'parent' => $categories['parent_id'],
                                        'level' => 0,
                                        'path' => $categories['categories_id'],
                                        'next_id' => false
                                      );

    if (isset($prev_id)) {
      $foo[$prev_id]['next_id'] = $categories['categories_id'];
    }

    $prev_id = $categories['categories_id'];

    if (!isset($first_element)) {
      $first_element = $categories['categories_id'];
    }
  }

i wanna insert an image at the very top of it all, but within the php code so there is no gap between where the php starts and the html ends

newbreed 05-12-2005 12:05 AM

Quote:

Originally Posted by JaceXXX
oscommerce...customizing it....trying graphical infobox headers for the first time


Dude I am all over that shit, hit me up 346940591

newbreed 05-12-2005 12:06 AM

Like this?

http://www.newbreedmedia.com/rare/catalog/

broke 05-12-2005 12:06 AM

Use:

Code:

<!-- categories //-->
          <tr>
            <td>
<?php
  echo "<img src='images/CategoriesBox/header.jpg' width='150' height='15' border='0'>";
  $categories_string = '';

  $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . $languages_id ."' order by sort_order, cd.categories_name");
  while ($categories = tep_db_fetch_array($categories_query))  {
    $foo[$categories['categories_id']] = array(
                                        'name' => $categories['categories_name'],
                                        'parent' => $categories['parent_id'],
                                        'level' => 0,
                                        'path' => $categories['categories_id'],
                                        'next_id' => false
                                      );

    if (isset($prev_id)) {
      $foo[$prev_id]['next_id'] = $categories['categories_id'];
    }

    $prev_id = $categories['categories_id'];

    if (!isset($first_element)) {
      $first_element = $categories['categories_id'];
    }
  }


Jace 05-12-2005 12:06 AM

Quote:

Originally Posted by broke
Paste more of the code... I think it's carry over from the line above.

echo "<img src='images/CategoriesBox/header.jpg' width='150' height='15' border='0'>";

Should work just fine.

that was it, thanks so much

Jace 05-12-2005 12:07 AM

Quote:

Originally Posted by newbreed

yeah

i have done oscommerce before, but just never played with graphical headers for the infobox....i am gunna make this design so dope...LOL

wish I could show you all, but it is kind of secret right now

newbreed 05-12-2005 12:08 AM

Quote:

Originally Posted by JaceXXX
Code:

<!-- categories //-->
          <tr>
            <td>
<?php
<img src='images/CategoriesBox/header.jpg' width='150' height='15' border='0'>
  $categories_string = '';

  $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . $languages_id ."' order by sort_order, cd.categories_name");
  while ($categories = tep_db_fetch_array($categories_query))  {
    $foo[$categories['categories_id']] = array(
                                        'name' => $categories['categories_name'],
                                        'parent' => $categories['parent_id'],
                                        'level' => 0,
                                        'path' => $categories['categories_id'],
                                        'next_id' => false
                                      );

    if (isset($prev_id)) {
      $foo[$prev_id]['next_id'] = $categories['categories_id'];
    }

    $prev_id = $categories['categories_id'];

    if (!isset($first_element)) {
      $first_element = $categories['categories_id'];
    }
  }

i wanna insert an image at the very top of it all, but within the php code so there is no gap between where the php starts and the html ends

Gotcha, see the post above, he nailed it. I thought you meant the table headers.

V_RocKs 05-12-2005 12:10 AM

Damn... wow.... I'm just gonna keep my mouth shut.. ;)

Damian_Maxcash 05-12-2005 12:12 AM

Quote:

Originally Posted by JaceXXX
that was it, thanks so much

If you use any HTML in a PHP tag it has to be with an 'echo'

I would guess that it would be better practice to just put the image in before the PHP tag, but unless you talking about millions of hits I doubt it would make a difference.

Jace 05-12-2005 12:20 AM

Quote:

Originally Posted by damian2001
If you use any HTML in a PHP tag it has to be with an 'echo'

I would guess that it would be better practice to just put the image in before the PHP tag, but unless you talking about millions of hits I doubt it would make a difference.

when i put the html before the php tag it creates a gap between the image and php...and it needs to be seemless

Jace 05-12-2005 12:21 AM

Quote:

Originally Posted by V_RocKs
Damn... wow.... I'm just gonna keep my mouth shut.. ;)

about what? actual knowledge being shared on gfy? LOL

i am a graphics guy who happens to know extensive html and basic coding :) i hire people to do my work! haha


All times are GMT -7. The time now is 01:57 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123