No 100% sure what you mean. The above would work. But the Pagination class does have a config setting where you can set the page segment the class looks for:

$config['uri_segment'] = 3;

All the details you could ever need at :)

What are you trying to acheieve exactly? Mixing server side sessions with onclick events usually indicates you need to rethink your logic.

Nonetheless, for your question you need a bit of JavaScript:


<a href="#" onclick="doSomething();">


<a href="#" class="clickable" data-session="something"> ...

Then, to catch the click:

$('.clickable').click(function() {
    var sessionFromLink = $(this).data("session", "default-value");
    // do other stuff here ...

Hope that helps. I think it's what you're after.

To compare the clicked link to the value stored in a session. YOu could use an ajax call. Alternatively, as long as the data is not sensitive, output the value in a javascript value:

var currentSession = '<?php echo(!empty($_SESSION['something'])) ? $_SESSION['something'] : '';' ?>'; // security checks, escape output etc.

You could then use the currentSession variable within the above click event.

However, I'd personally be looking refactor your soltuion, as things are getting rather arkward and insecure pretty quickly :)

In short: session_start() should be called once only, at the top of the page, before any output is sent to the browser :)

It will always return 1 as you're not incrementing $i within your loop - at the minute you're passing the function the number 0 and then adding 1 to it - your logic is flawed. You need to change your function:

function width($theid,$i) {
$get = mysql_query("SELECT * FROM block WHERE sid='$theid'",$this->connect);

$number = $row['id'];
$this->width($number, $i);


return $i;


Alternatively, you could just return a row count as mentioned above.

I'd highly recommend you have a look at the basic tutorials on lopps on

Lol, says I have to wait 40 minutes to download your file, no thanks.

[QUOTE=almedajohnson;1484149]I don't understand your question. please specify it. And the 2 URL you have posted are from the same site...[/QUOTE]

He's asking if it's betetr to inclide a .html to the url, the urls he's posted aren't the same at all.

So you're basically just getting all records within a certain period of your 'dateofservice' column. Can be done using sql only - something along the lines of

SELECT servicearea, date, customerid, clientID, DATEDIFF(dateofservice, NOW()) As countDaysDiff
FROM servicesrendered
WHERE countDaysDiff = '80' AND servicearea = 'Oil Change'

Things like this are good for learning, but I really wouldn't recommend it on a live site as thumbs are being recreated each time the script is called - which is bad practice and unecessary.

You should really be caching the generated images. There's quite a good one that caches your thumbnails at [url][/url]

I'd also advise using htaccess to rewrite your image locations as they are very messy with such scripts. E.g. turn image.php/coffee-bean.jpg?width=150&height=150&cropratio=1:1 into images/cached/xl/coffee-bean.jpg
(Note - you need to use the full image path on your rewrite rule - even if you have set a rewritebase!

Just to double check, the file you posted is called upload.php, as that is where your form data is being posted. If so, change the submit button code to the following and report back:

if ( isset($_POST['submit']) ) {

$name = $_FILES['myfile']['name'];
$tmp_name = $_FILES['myfile']['tmp_name'];
$location = "avatars/$name";
$query = mysql_query("UPDATE Persons SET imagelocation='$location' WHERE Id ='$Id'");

echo $_FILES['myfile']['error']; //the error message returned


Following works for me fine:

[CODE]$name = $_GET['record'];
$the_catagory = $_POST['catagory']; //the variable from the

if ($the_catagory == "players") {

} elseif ($the_catagory == "events") {

} elseif ($the_catagory == "sales") {


install wordpress on your own server. THis way you'll get some seo benefit when someone links to your blog.

If you have a really large site, install the blog on a subdomain.

[QUOTE=ciidoctor;1472189]hahaha of course goooooooooooooooogle[/QUOTE]

I don't just mean Google because it's the biggest and most obvious :)

I mean just Google because other search engines and directories scraps content from Google :)

Like many SEO things this is no exception - no one knows for sure :) Personally, I think it's down to how much a site gets updated with fresh content.

On a recentish static 5 page website a change to the main desc took nearly a week. On my personal wordpress blog, that get's updated every week or so (sometimes twice a week) the change takes a couple of days. However, on my twitter account, I post links to my blog, that I'm sure helps.

I'm sure PR comes into somewhere.

You also have the issue in that Google doesn't always use your meta description, as Google may see it as not relevant sometimes.

In summary, change your desc and wait, get a few links along the way can't hurt either :)

Submit it to Google, all you need.


[QUOTE=galaxyweblinks;769764]Hello all,

What is mean by SEO? Is the SEO work will useful for marketing the website?

Send me your suggestions as posts.

Thank you for your replies…[/QUOTE]

stop spamming please.

I'm still not sure why people are bothered about PR, as a high PR does not mean high ranking in the SRERPs. PR is a single metric Google uses.

Can you post the html for your form and say what fields you want excluding. I'll post up some updated code then :)

Yes, as above, would need some more info on your order items table. A common way of storing orders and items is to have two tables - an order header table and order items:

order_id (PK)
customer_id (FK)

order_item_id (PK}
product_id (FK)

For the OrderItems table you may also need to note your business rules in relation to the product_id foreign key. E.g. with the above your order info screen would change if the original product id was altered. Some business rules require the product_id not to be stored and original info (E.g. if the price of product ID 22 changed, you wouldn't want this updating in past orders query).

To bold the text you'll need to send the email in html format, you'll need to add some extra headers and pass them to the mail function, so you have your code the same but add the following:

$headers = 'MIME-Version: 1.0' . "\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\n";
$headers .= "From:" . "\n";

$send_contact = mail($to, $subject, $message, $headers );

That extra option line outpoutting is weird. What is outputted to the screen when you add the following after your loop?

echo $job_output;

One way to find out such links is

  • define your targeted keywords
  • Search in google for those keywords one by one
  • write down top website urls
  • search top websites link (
  • place your link there[/QUOTE]

Lol, you make getting a backlink from .gov and .edu sites so easy - in reality they are some of the hardest links to get. You need to be providing some serious quality and relevant content to get a link from such a site.

Please please don't get caught up in the whole Page Rank saga. At the end of the day it's a metric Google uses to asses the importance of yuour site. There are many examples of where lower Page Rank sites rank above higher PR sites. E.g. Google 'web design' and have a look at the PRs of the top 7 or so sites.

Slightly off topic, you should clean the contents of $_POST['search'] before using it in the SQL query as $search=$_POST['search'] represents a security risk

[QUOTE=bkimbriel;1471590]Thank you so much! That worked perfect. Any clue as to why Option 1 keeps showing up though?

It displays perfect now except with...

Job 1 - Option 1 - Quantity 1
Job 2 - Option 2 - Quantity 2

  • Option 1 -[/QUOTE]

Can you post your updated code?

I'm confused :)

Do you mean you want to parse another XML feed or display extra information for your current feed?

It may help if you do a print_r on your feed data to see all available information of have to work with:

<?= print_r($feeds->data); die(); ?>

Slightly off topic, but have you considored using MySQL's full text searching instead of LIKE?

What are risks when uploading files other than limiting some extensions (like exe's)?[/QUOTE]

That also depends on how you're checking your extension. E.g. say you're getting the extension from the filename via $_FILES['myfile']['name'] using PHP's string functions, the value of $_FILES['myfile']['name'] can be faked. For images you can use [URL="

Stefano Mtangoo commented: thanks for that +6

To output the job as you want, there are a few ways. YOu could remove your three 3 loops and have a single loop:

while(list($key,$value) = each($_POST['job'])) {

$job = $_POST['job'][$key];
$material = $_POST['material'][$key];
$quantity = $_POST['material'][$key];

$job_output .= $job . ' - ' . $material . ' - ' . $quantity . "\n";


This will output your jobs like:

Job 1 - Option 1 - Quantity 1
Job 2 - Option 2 - Quantity 2