Jump to content

adam_gardner

Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

adam_gardner's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. ahh great! all i was missing was the . after $main wisewood - i mentioned that i used your method, but i wanted all the results in the same marquee - so they scroll side by side. all sorted and solve3d now - thanks! Adam
  2. hi guys, i've simplified my query down to make it easier to understand, but the query's working fine its just hte output. ok, selecting products, then looping to get all of them, then $main stores the values of the products. however, when I try and output to the page (within a marquee) it only picks up the first result. do i need to store the results as an array first? how do i do that? note :: when i move the "echo - marquee" statement inside the loop it display all products, but each in their own marqee. What i want to do is make all the products scroll in the marquee. Any help would be great! code is below - [code] <? $queryF = "SELECT * FROM Products"; $result=mysql_query($queryF) or die (mysql_error() . "\nActual query: " . $query); $num=mysql_numrows($result); $i=0; while ($i < $num) { $ProductName=mysql_result($result,$i,"ProductName"); $main = "Products-Returned-From-Result"; $i++; } echo "<MARQUEE BEHAVIOUR=SCROLL>$main</MARQUEE>"; ?> [/code]
  3. damn, i knew it would be so simple! thanks! adam
  4. hi guys, sure this is real simple for the pro's i just don't know the operator or whatever to make it work. my msgID field is unique, so - SELECT * from messages ORDER by msgID works fine but how would i invert the order (so msgID 3 showed above 2 etc.) thanks for the help! Adam
  5. hi guys, what i want to do is use an if - else to compare a variable to a load of variables. I could of course use an OR, but i've got about 200 variable to compare -- long loop! what i want to do is compare it to a files content - so for example i have a file called [b]compare.txt[/b] my compare.txt file has the lines - a b c d e (etc.) so (pseudocode) - $myvariable='f' if $myvariable == compare.txt variables [i]do something[/i] else [i]do something else[i] so in this case it would return false is there a way to do this or would i have to list a,b,c & d as seperate variables? thanks for the help! Adam
  6. [!--quoteo(post=362877:date=Apr 8 2006, 05:31 PM:name=desithugg)--][div class=\'quotetop\']QUOTE(desithugg @ Apr 8 2006, 05:31 PM) [snapback]362877[/snapback][/div][div class=\'quotemain\'][!--quotec--] umm not sure what you mean but try this <?php $link = mysql_connect('localhost', 'username', 'password'); if (!$link) { die('Could not connect: ' . mysql_error()); } $db_selected = mysql_select_db('tpf'); if (!$db_selected) { die('Could not select database: ' . mysql_error()); } $result = mysql_query("SELECT message FROM inbox WHERE messageID = 'message id'); if (!$result) { echo 'Could not run query: ' . mysql_error(); exit; } $row = mysql_fetch_row($result); echo $row[0]; // 42 ?> and make it so its in a table and even with html variables like <center><br> etcc.. it should display properly [/quote] nope, not sure you got me -- here's my php code the problem is, like i'm doing in this post, putting line breaks everywhere, my text seems to run together. here's the barebones of my php - very straight forward really. <? $query="SELECT * FROM messages WHERE toID = $CID"; $result=mysql_query($query) or die (mysql_error() . "\nActual query: " . $query); $num=mysql_numrows($result); echo "Inbox"; $i=0; while ($i < $num) { $Msg=mysql_result($result,$i,"message"); echo "Message :: $Msg"; $i++; } ?>
  7. hi guys, I have a field set-up to store a users comments - like a message. how can i get it to output again with the correct formatting they gave it? (i.e. line breaks etc.) because all my text just runs together is it a php thing or a mysql formatting issue? ps. my data appears as I typed it when viewed in phpmyadmin, but not when i echo it. any help would be great! thanks! Adam
  8. hi all, first off, i'm really really sorry if this has been seen a thousand times ... but it seems like everyone has a differing opinion on this one. ok easiest way is to show you the page - www.lumoslighting.co.uk splits into two sub-sites - domestic.lumoslighting.co.uk and commercial.lumoslighting.co.uk now - if you browse to either sub-site, on first load, you'll notice the categories on the left all have session id's attached to them - these are needed for when a guest browses the site, adds stuff to cart and then goes to checkout (which requires registration, then products are carried with them) however, the search engines seem to have a problem with session ids (because of the potentially unlimited amount of urls they can spider) so they tend to leave them alone and not spider them. (apparently) my question(s) is/are this - 1. Do the search engines care about session ids? (please only a definitive answer) 2. How can i get rid of them and still allow guests to have cart functionality? (i do not wish to use cookies - the site was developed like this and it will take major time / money to have it altered - not feasable.) 3. the engines crawling this site is paramount - no rankings - no income. 4. does anyone have any good lighting sites that will link to us? :P thanks for your time in replying! regards, Adam
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.