Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
I'm working on a website that was originally built using codeigniter. It's a mess on the back end and there's no identifiers to anything really. I've recently changed a banner (header.php) and edited the style to fit as required. I added a simple img source= and a href= into the header.php and it seems to be displaying fine on the homepage. However once I navigate away to other pages the img source isn't displaying whilst all my other changes are?
The a href link remains with the class but the image is displaying as broken.
I've checked all the locations etc and it's all pointing to the correct place?
Any ideas?
I understood that you have given relative path to your image directory. You have to prepend base_url in src tag as follows
<img src="<?php echo base_url('/path/to/image.jps');?>" alt="Image"/>
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
I have a form with an add user button. If the user is added, the page should redirect to another page which would allow you to edit that user.
What I currently do is:
if ($user_added) {
<META HTTP-EQUIV=refresh CONTENT='0;
URL=<php echo $root. "Path1/path2/path3/userEdit.php?ID=".$newUser->GetID(); ?>'>
NOTE: ID is not something you can switch to easily, its a different more complicated number that i generate randomly whenever I add users, for the sake of the question i kept it simple.
UPDATE: This changes the page to the userEdit page but it does not load the data from the new user.
You are mixing html and php. PHP redirects can be done with a header BEFORE the page loads like so:
<?php header('Location: http://mywebsite.com/index.php'); ?>
But again this only works if the content has not yet been sent.
Also:
URL=<php echo $root. "Path1/path2/path3/userEdit.php?ID=".$newUser->GetID(); ?>'>
This is also insecure because any user can access any user's page simply by changing the url.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
http://www.aliexpress.com/item/NEW-7-Android-2-3-256MB-DDR2-4GB-NAND-Flash-7-inch-tablet-pc/498159194.html - I got this link
Here you can see a buttons: bundle, color
If you click some of them the price will change, but the question is how can I parse that behaviour to my page via php?
The problem is that I can't understand where is javascript code that executes this, or how to find it, maybe someone got ideas about that?
Inspecting that page's source code I can see that the skuProducts variable in javascript contains this information encoded into a JSON-string. You can't really run this javascript code on your webserver, so you'll have to devise another way to get that variable's value - and then you can use json_decode() to get the contents.
Note that changing the amount of items results in an AJAX call to a shipping costs calculator. You could probably simulate that, but I'm not sure that webshop would like that (and it might be illegal).
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have a page /home/practice.php . On the page, i have elements with assigned id's. I want to refer to the elements . For example, practice.php/#footer , but all the content from the page disappears and i get a blank page . Even if i just put a slash, i.e practice.php/ , nothing shows up on the page.
This entirely depends on how you've set your page up, but just as with any HTML page you should be able to refer to:
page.php#anchor
Where anchor refers to an id within the page.
Note the lack of / before the #
Your file is practice.php. Placing a / at the end will make your browser treat practice.php as a folder instead. If you want to use #footer in your URL, simply use practice.php#footer.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
Basically I have a price ticker in my header.php (wordpress) file aligned to the left.
Its just below the main menu and above the slider. The problem I am having now is I want to put the ticker aligned next to my main menu aligned to the right. I want the menu to end and the ticker to follow... I think i should have to edit the css file to do this but I'm not totally sure. The ticker is in .php also.
I have successfully gotten the ticker to the right of the page almost where I want it but its not aligning with the menu...
I have attached a screen shot to show what I mean but due to privacy reason iv edited out alot of the website information.
http://imgur.com/5JwXpil
Any help will be seriously appreciated. :)
You can adjust your code to float it left and adjust the width so that it fits the place where you'd like to put it.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 8 years ago.
Improve this question
This is not a duplicate.
Neither one of these methods work
CodeIgniter view loading not loading in order?
Codeigniter View and echo
$this->load->view('includes/header');
$this->load->view('includes/left_sidebar');
$this->load->view('content/content');
$this->load->view('includes/footer');
I've tried the 'echo' suggestion in the two links both with the second parameter as null and as array();
No matter what I do, the sidebar always loads at the bottom.
I've also tried loading these views within the content view with no luck.
I am using CodeIgniter 2.14, Any other suggestions for getting the views to load in the correct order?
There is no php functionality other than loading the includes.
check your css for sidebar. Check source code of the rendered page and see if sidebar section is at the bottom or at right place.