Jump to content

plutomed

Members
  • Posts

    267
  • Joined

  • Last visited

    Never

Everything posted by plutomed

  1. http://jsfiddle.net/8Gnz6/ That is an example of my code. Where the error comes in is if you click the arrow and move the div into the new table item and the droppable sort of freezes and the item doesn't get added. But if you add it to the original which is loaded when the page loads it works fine. I've been trying to figure this out for a while now, its probably something minor and a stupid mistake, but is there anyone can can help?
  2. I just remember constant(); Got it working. Say I had a field in my db that contained FOO. In my php code I had define("FOO", "bar"); What I wanted to do was get the value from the database and echo the constant value. I just put in the code as you would echo from a db normally and it echoed FOO. by putting constant around it, it echoed bar. If that is any better explanation?
  3. This is probs. an easy one but I have in my database some values, these values are defined constants in my php code. How do I display the value of the constant not the text (constant name)?
  4. Now thats an even better idea. How stupid of me to not think of that. Even though that has solved my problem. I was reading in the php manual: If I wanted to see if the @ was there error_reporting will return 0. But I think it will be the best idea to use file_exists()
  5. The bit of code I'm using it on is: if((@include("languages/".LANGUAGE.".php")) != 1) { require("languages/".DEFAULT_LANG.".php"); } But the error is still be produced. I'm using a custom error handler, is there anyway to include the @ in the custom error handler?
  6. Don't worry about it. I've changed the way I'm attacking the problem.
  7. $array = explode(";", $string);
  8. Basically I'm creating a template parser. In my html code I have if functions that obv. need to be replaced by the template parser in php. The regex I'm using is: /<!--IF\(([A-Za-z0-9\/\.]+)((?:!|<|>|=)?(?:=?))([A-Za-z0-9\/\.]+)\)-->(.+)<!--ENDIF-->/ Which will match all if statements except one's that contain new lines. This will match: <!--IF({LOGGED_IN}!=1)--><a href="{LOGIN_URL}">{L_LOGIN}</a><!--ENDIF--> This won't match (well the internal ifs do): <!--IF({LOGGED_IN}==1)--> <a href="{UCP_URL}">{L_UCP}</a> ( <a href="{UCP_PM_URL}">{NUM_NEW_MESSAGES} <!--IF({NUM_NEW_MESSAGES_TEST}!=1)-->{L_NEW_MESSAGES}<!--ENDIF--> <!--IF({NUM_NEW_MESSAGES_TEST}==1)-->{L_NEW_MESSAGE}<!--ENDIF--> </a> ) <!--ENDIF-->
  9. Could you not create the image with PHP's GD and image tools? http://uk2.php.net/manual/en/ref.image.php
  10. To could, or you could just do it correctly in the first place! Yer ok ok lol. I just thought aswell. If you're gonna redirect to another page. Why echo on that page?
  11. Could you not put ob_start(); at the begining of the script and ob_end_flush(); at the end?
  12. I mentioned that because without the http:// it tries to redirect to the domain on your site. :/ Also doesn't the header( "Location: $redir" ) ; need to be header( "Location: ".$redir ) ; ?
  13. Is the store_id field in your database an integer? If it is as waynewex said you don't need the quotes.
  14. Have you put http:// in the string url?
  15. $link = preg_replace("/watch\?v=/", "v/", $var); Edit: Or what mjdamato said.
  16. Sore them in the database as html code?
  17. Could you not use Ajax and change the content of a div.
  18. echo "</pre>"; Need the closing tag aswell.
  19. if(isset($_POST['infopackage'])) $infopackage = $_POST['infopackage']; // not required And the same for the other 3.
  20. You are trying to send the mail to the username. $to=$myusername; Try $to=$email; or $to=$_POST['email'];
  21. I think your problem might be with these. !isset($_POST['infopackage']) || !isset($_POST['wholesale']) || !isset($_POST['monthlyspecial']) || !isset($_POST['couponcode'])) Because if a checkbox is blank it doesn't set a variable so !isset($_POST['couponcode']) will return true. Which should throw the function died(); Why are you checking is these have been set if not if they are no required?
  22. Ahh that lovely error. Oo, typo: $tbl_namer=cpdUsr; Should that "r" be there in "namer"
×
×
  • 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.