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 https://ellislab.com/codeigniter/user-guide/libraries/pagination.html :)

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:

Change:

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

To:

<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:

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

while($row=mysql_fetch_assoc($get)){
$number = $row['id'];
$this->width($number, $i);
$i++;

}

return $i;

}
[/CODE]

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 w3schools.com.

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

[ICODE]
SELECT servicearea, date, customerid, clientID, DATEDIFF(dateofservice, NOW()) As countDaysDiff
FROM servicesrendered
WHERE countDaysDiff = '80' AND servicearea = 'Oil Change'
ORDER BY id DESC
[/ICODE]

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]http://shiftingpixel.com/2008/03/03/smart-image-resizer/[/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:

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

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

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

}
[/CODE]

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") {

}[/CODE]

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.

/thread

[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:

[B]OrderHeader[/B]
order_id (PK)
customer_id (FK)
order_date
etc.

[B]OrderItems[/B]
order_item_id (PK}
product_id (FK)
quantity
attributes

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:

[code=php]
$headers = 'MIME-Version: 1.0' . "\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\n";
$headers .= "From: noreply@youremail.com" . "\n";

$send_contact = mail($to, $subject, $message, $headers );
[/code]

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

[code=php]
echo $job_output;
die();
[/code]

[QUOTE=sslguru;1466633]
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 (backlinkwatch.com)
  • 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:

[code=php]
<pre>
<?= print_r($feeds->data); die(); ?>
</pre>
[/code]

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

[QUOTE=evstevemd;1471557]
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:

[code=php]
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";

}
[/code]

This will output your jobs like:

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