Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Need some help regarding PHP

Featured Replies

Hello all.

 

I'm trying to help a friend of mine with their website but I don't have a great deal of skill when it comes to PHP. Essentially what he wants is to have a featured ads section consistently throughout his website.

 

For example, if you look at the link below, you can clearly see a dedicated featured ads section at the top.

 

http://www.ni-ads.com/index.php

 

When you click on the below like, a sub category, you'll see that there is no featured ad section at the top.

 

http://www.ni-ads.com/index.php?cat=37

 

How easy is this to amend? He's using ionCube but there is apparently no option to add this feature?

 

Many thanks for any help!

 

:)

The easiest way is to use PHP includes. You'd have a file such as featured.php which runs the functions and produces the featured ad output, then you include into your page template using:

<?php include('featured.php'); ?>

and it will insert the output of featured where you want it to.

 

All you need is the featured file getting the correct content, and to locate in which file to put the include.

  • Author

Thanks for you help Mr. Brightside. Seems very logical but it doesn't appear to be working for me. Do I need to enter <?php include('featuread.php'); ?> into a corresponding .php file or .html file? Do I need to create something within an html file so that the PHP shows correctly though within a browser?

 

I think I'm about to pass this one on, seems to be too much of a head-scratcher.

 

:lol:

Thanks for you help Mr. Brightside. Seems very logical but it doesn't appear to be working for me. Do I need to enter <?php include('featuread.php'); ?> into a corresponding .php file or .html file? Do I need to create something within an html file so that the PHP shows correctly though within a browser?

 

I think I'm about to pass this one on, seems to be too much of a head-scratcher.

 

:lol:

 

It needs to be in a PHP file for the PHP code to work

PM sent.

 

It would be more beneficial for the forum, and it's visitors, if you were to post any help you supply in here, rather than/in addition to a PM.

 

Otherwise, it gets to the stage that there is no need for a forum at all, and we all may as well just use facebook :p

It would be more beneficial for the forum, and it's visitors, if you were to post any help you supply in here, rather than/in addition to a PM.

 

Otherwise, it gets to the stage that there is no need for a forum at all, and we all may as well just use facebook :p

 

It was regarding a security hole I found. I thought it not appropriate to describe on open forum.

It was regarding a security hole I found. I thought it not appropriate to describe on open forum.

Hi davewilly could you plz check your pms thx

 

And as chris is no longer doing this work can anyone else help? thx

Hi davewilly could you plz check your pms thx

 

And as chris is no longer doing this work can anyone else help? thx

 

as stated above, just add

 

   <?php include ('featured.php'); ?>

 

into the page code. where you want the featured ads to appear ...

as stated above, just add

 

   <?php include ('featured.php'); ?>

 

into the page code. where you want the featured ads to appear ...

 

Hi as much as i appreciate the reply you may aswell be speakin chinese :( i really havent the 1st clue about "php" or anything related. what i need is someone to take on the work..what i have right now is the featured ads are displayed at the top of the category they were placed in. what i need is someone to "box" them off so they appear seperate to the other listings. i will pay for the work

 

thx again

Hi as much as i appreciate the reply you may aswell be speakin chinese :( i really havent the 1st clue about "php" or anything related. what i need is someone to take on the work..what i have right now is the featured ads are displayed at the top of the category they were placed in. what i need is someone to "box" them off so they appear seperate to the other listings. i will pay for the work

 

thx again

do you want it exactly the same from the homepage onto the other page ? with the box etc

do you want it exactly the same from the homepage onto the other page ? with the box etc

no m8 i need the home page featured ads to stay as they are what i need is if you click this link you will see the featured ads dont appear seperate from the other listings. http://www.ni-ads.com/index.php?cat=37 i need them to appear seperate like these featured ads

http://www.gumtree.com/london/cars-for-sale_9438_1.html

no m8 i need the home page featured ads to stay as they are what i need is if you click this link you will see the featured ads dont appear seperate from the other listings. http://www.ni-ads.com/index.php?cat=37 i need them to appear seperate like these featured ads

http://www.gumtree.com/london/cars-for-sale_9438_1.html

let me try simplify it a bit..right now at this link http://www.ni-ads.com/index.php?cat=37 you see

 

Featured ad

Featured ad

Featured ad

Featured ad

Featured ad

free ad

free ad

free ad

 

 

what i need is

Featured ad

Featured ad

Featured ad

Featured ad

Featured ad

===============seperator here==============

free ad

free ad

free ad

let me try simplify it a bit..right now at this link http://www.ni-ads.com/index.php?cat=37 you see

 

Featured ad

Featured ad

Featured ad

Featured ad

Featured ad

free ad

free ad

free ad

 

 

what i need is

Featured ad

Featured ad

Featured ad

Featured ad

Featured ad

===============seperator here==============

free ad

free ad

free ad

 

it shouldn't be too hard to do, just add a border around the code ... could you send me the file .. i will pm you my email

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.