Jump to content

complex05

Members
  • Posts

    124
  • Joined

  • Last visited

    Never

Everything posted by complex05

  1. [code]mysql_query("UPDATE `links` SET `colpos` = $oldcp WHERE `colpos` = $newcp AND `cat` = '$currentCategory' LIMIT 1");[/code] The problem might be with your initial data. Are all your rows in perfect order right now? (1,2,3,4) what might be happening is it's looking for $newcp and it's not there, so this query fails.
  2. the first line of your script, type ob_start();
  3. I built the exact same script recently, here is my code, maybe it will help [code]if ($action == "move_project") { $query = mysql_query("SELECT `order` FROM whatson WHERE id=$id"); $data = mysql_fetch_array($query); $project_order = $data["order"]; switch($direction) { case 'up': $new_order = $project_order - 1; break; case 'down': $new_order = $project_order + 1; break; } mysql_query("UPDATE whatson SET `order`=$project_order WHERE `order`=$new_order"); mysql_query("UPDATE whatson SET `order`=$new_order WHERE id=$id"); header("location: whatsonadmin.php?action=view_projects"); } [/code]
  4. remove die(); from your script.
  5. $query = mysql_query("SELECT * FROM orders WHERE order_item = '$value'"); $check = mysql_num_rows($query); if(!$check) { mysql_query("insert into orders (order_item) values ('$value')",$con); } else {             $query = mysql_query("SELECT quantity FROM orders WHERE order_item='$value'");             $data = mysql_fetch_assoc($query);             $quantity = $data["quantity"];             $quanitity = $quantity + 1; mysql_query("UPDATE orders SET quantity=$quantity WHERE order_item='$value'"); } That should work.
  6. It's definitley a loop problem, but unless you post your code we won't be able to help you out. I would recommend trying to isolate each loop to figure out which one is causing the delay and going from there.
  7. Your problem is you are not adding +1 to the old link, but you are -1 from the link you are trying to move. Try this $linkToReplaceCP = $result4[colpos]; $linkToReplaceCP = $linkToReplaceCP + 1; then in your query mysql_query("UPDATE `links` SET `colpos` = $linkToReplaceCP WHERE `colpos` = $newcp AND `cat` = '$currentCategory' LIMIT 1");
  8. Hey Tallberg, I would recommend installing an FTP server on your machine, such as Serv-U or FileZilla and use their functions to manipulate permissions. Hope that helps, Barry
  9. hello, I'm trying to make a basic image gallery script, where images are displayed from a while(readdir()), and each image is linked to the next image in the dir so basically it'll be like gallery.php?image=1.jpg, then the image on this page will be linked to gallery.php?image=2.jpg how do I tell the script what the next image in the directory is? here is my code: [code] <?php if ($handle = opendir('.')) {   while (false !== ($file = readdir($handle))) {       if ($file != "." && $file != "..") {           echo "<a href=gallery.php?image=???><img src=gallery/$file border=0></a>\n";       }   }   closedir($handle); } ?> [/code]
  10. I can't have a tableless design... i need it to be graphical. Any other suggestions?
  11. I actually can't have it there because that curve is an image that needs to be there; the menu needs to start below it.
  12. not quite :) http://pcc417.com/nexus/weather_xml.php?id=CAXX0504
  13. no tables outputting, just links.
  14. yeah it's definitley an HTML problem haha, I have no problem with PHP :) <TD valign="top" height="85" background="images/index_04.gif"> <IMG SRC="images/index_03.gif" WIDTH=223 HEIGHT=85 ALT=""></TD> </TR> <TR> <TD WIDTH="223" background="images/index_04.gif" valign="top" height="100%"> <table width="100%" cellpadding="0" cellspacing="0" class="menu" height="100%"> <tr> <td width="55"></td> <td valign="top"><? include("menu.php"); ?><p></td> </tr> </table></TD> </TR> <tr> <td colspan="2"><img src="images/bot.gif"></td> </tr>
  15. check out this page: http://www.phpfreaks.com/phpref/125.php $_SERVER['HTTP_REFERER']
  16. Hello, This is probably the newbiest question you've ever heard... but please view this page http://pcc417.com/nexus/weather_xml.php?id=CAXX0504 I can't get the right menu to valign properly... does anyone see the problem?!
  17. hello, I've seen a function before that does this but forgot what it was. Right now whenever I use $data = mysql_fetch_array($query) i do the following after: $name = $data["name"]; $email = $data["email"]; $phone = $data["phone"]; etc etc etc... isn't there a function that will do all of this for me?
  18. Well we want it to be able to to link to any user's local scanner, without using upload. I know it sounds stupid, from my perspective, there is nothing wrong with scanning and image then uploading it, but my stupid client WANTS it to be one step, online. I have to give him an answer by tomorrow, weather or not it's possible to do this web based.
  19. Hello, I have a potential client who is looking to develop some web based software for his orthotics company. He wants his software to be able to do this: 1. Click a "scan" button 2. Scan button sends command to scanner over the web, and scans the image 3. From there, the image is uploaded onto the web and displayed on the page Is this possible? Possibly using sockets? The only thing I don't know how to do is to send commands directly to the scanner or to the server, and have the scanner/server send the image back to my script. Any help is appreciated - if you know any SDKs or APIs that can this that would be great aswell. Thanks! Barry
  20. Can you be more specific in why you are storing this "data" and what exactly it is doing in the cookies - perhaps there is an alternate method rather than using cookies.
  21. That's fine, if there are exceptions where the expiry runs into the next month, it's no big deal thanks a lot for your help!
  22. Now we are having a different problem, how do I modify the query so it will only look for how many reservations are in the current month?
  23. either that or start your script by calling ob_start();... I use it, some people think it's ghetto I don't see the problem though...
×
×
  • 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.