Jump to content

spooke2k

Members
  • Posts

    74
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

spooke2k's Achievements

Member

Member (2/5)

0

Reputation

  1. when calculating i am trying to add to variables together like this but it not work why. $total = ($a+$b); Thanks spooke2k
  2. Hi i have a table i need to sort information into via the total cost, now i cant do certain calculations easly in mysql because of the varying variables depending on what it brings back, so im using php to work the calculation out on the webpage. But i want to display the information in a table in desc order from total cost. So say i have 4 results A=10 B=11 c=1 D=-10 i need to find a way play them in order of the total i worked out. I know i can stick the results into an array after i worked out the calulations but im not sure best way to sort them once i have them in an array. Thanks Spooke2k
  3. cant use timeout because the first form is a login and the page has many forms on it.
  4. Need to find another method!!!!!! i was using header("Location: http://test.com/alt.php"); on my php page as a refresh to reload the page as i need to refresh the whole page but hold my sessions i set to rest the forms on it. but then i had to create a header redirection page in the website to have get the websites template page on the page i created for the menu logo etc. so turning the original page into a redirection to achieve this. So now my php page is in zen cart and is called in on the first the redirection nut when i try and use a second header location it doesnt work. I despaterly need the page to refresh or reload on the page called in the header and it seems i cant have two headers operating does anyknow know how i reload/refresh the page please.
  5. hello i will try and explain this best as i can as i dont really understand whats wrong with code. TO start with the php page i have created works fine on its own as a stand alone page but i need to move it into zen cart define page editor. this then holds my code as it was in website source code etc and where the page was originally is now changed to this <?php header('Location: /index.php?main_page=test'); ?> so when i visit my website www.whateversite.com/test it redirects to the define page which should then bring up my header of the website and my page in it. After many hours or pain and problems i have narrowed it down and can get the page to display but the php barely works, it is a right mess and im so confussed as to why? however after playing around i found the page doesnt like the following types of commands in it. // echo "<form name='post1' action='{$_SERVER['PHP_SELF']}' method='POST'>"; '{$_SERVER['PHP_SELF']}' THIS DOESNT WORK I NEED IT TO DESPRATELY whatever address i try and put in the doesnt work NExt thing and this is more complicated to explain but i will try is this // $URL="test.php"; // header("Cache-control: private"); // header ("Location: $URL"); I use this as a refresh as i need the page to reload itself. // It has about 4 forms and html templates in the php page and i need it to drop its previous form when it reloads so the new form can loaded if not it seems to remeber old form and just adds new one under it. if anyone knows how to solve these to issues please help ive tried everything i can think off. Thanks :'( :'( :'( :'( :'( :'(
  6. sorry didnt seem to work not sure best way to implement can u please show a demo Thanks
  7. it works to a sort but not properly why i need to call the button itself thanks
  8. is there a way on the onclick on a radio button to call a submit button so the radio button basically does same thing as the submit button thanks
  9. it is bringing back 20 as it should on count displaying 19 on page Thanks for help
  10. sorry but what do you mean i need to change exactly which bit as i set that calulation on more than one point thanks.
  11. please help am so stuck im only display 19 restults and for life of me cant work out why Its a nightmare im sure its something obvious but i cant work it out Ps this isnt all cod ejust code that relates to the loops Thanks select * from pressimagelink where details like '%g069%' or productcode like '%g069%' order by productcode asc LIMIT 0,20 $rowsPerPage = 20; $count = 1; while($row = mysql_fetch_array($result)) { $productname[$count] = $row['productcode']; $radioList = array($productname[$count] => $productname[$count]); $count ++; } $start = 1; $end = 5; //$totalplus = 1; while($start <> $end) { // Sets initals product Code Array & Sets Radio Array $count = 1; //While set of 5 check first $stoponfive = 1; //set Product while($stoponfive != 6) { $totalall = ($totalplus + $stoponfive); echo "<td width=\"15%\"><div align=\"center\"> Product Code {$productname[$totalall]}</div></td>"; $stoponfive ++; } // Return line echo "<tr>"; echo "</tr>"; $stoponfive = 1; //set image while($stoponfive != 6) { $totalall = ($totalplus + $stoponfive); echo "<td width=\"15%\"> <div align=\"center\"> <img src=\"http://images/{$productname[$totalall]}.jpg\" alt=\"no image available\"/></div></td>"; //echo $productname[$totalall]; $stoponfive++; } // Return line echo "<tr>"; echo "</tr>"; $stoponfive = 1; //set radio while($stoponfive != 6) { //checks against previous values in checked $selected = ($value==$_POST[group2])?' checked':''; $totalall = ($totalplus + $stoponfive); echo "<td width=\"15%\"><div align=\"center\"> <input type=\"radio\" name=\"group2\" value=\"$productname[$totalall]\"$selected></div></td>"; $stoponfive ++; } echo "<tr bgcolor=\"#CCCCCC\"> <td height=\"10\" colspan=\"5\"></td> </tr>"; echo "<tr>"; echo "</tr>"; $start ++; if($totalplus == 1) { $totalplus = $totalplus + 5; }else { $totalplus = $totalplus + 5; } }
  12. to be honest i exspected replies , i just wasnt 100% sure i could resize without those problems anyway now i know thanks ill just use thumbnails. Thanks
  13. I have high res pics on my site and i want to display them as Large thumbnails. I dont want to have to create smaller pictures of the same thing and host them as well, is there anyway i can set a default image size and call in large pictures to autoformat to that default size . Ultimaterly making all image loading into a 200x200 table cell etc Spooke2k Thanks
  14. sorry to confuse <form name="post1" action= <?php echo $_SERVER[php_SELF]; ?> method="POST"> <INPUT name="code" value="" TYPE="hidden"> This is where form is set, for all intensive purposes there is no out put before i do this session_start(); if( $_POST['submit_button']=='Submit') { if(($_POST['submit_button']=='Submit') && isset($_POST['group2'])) { //Selected Screen Emtpy old table it doesnt do this it outputs the echo but holds the table data and screen created in part 2 echo "works"; }else{ //load table page values //Part 2 } Far as i can see it should just drop the html and rest in part 2 but it doesnt it holds it and that problem I hope this helps show what i am doing and where it is going wrong
×
×
  • 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.