Jump to content

schilly

Members
  • Posts

    870
  • Joined

  • Last visited

    Never

Everything posted by schilly

  1. ya i guess find the file in that component which outputs the pop-up image link then replace it with the proper video call.
  2. you could try: imagejpeg($image,NULL,100);
  3. ah i see. ya that's gonna be tough with joomla. can you just input the standard qtvr code in one of the docs? something like this: <object CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="320" height="256" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab"> <param name="src" value="sample.mov"> <param name="autoplay" value="true"> <param name="controller" value="true"> <embed src="sample.mov" width="320" height="256" autoplay="true" controller="true" pluginspage="http://www.apple.com/quicktime/"></embed> </object> Apple embed attributes: http://www.apple.com/quicktime/tutorials/embed2.html but if you're hoping for the client to take this over afterwards you can't really ask them to input this code into every listing =(
  4. what are your headers like?
  5. nope it's a separate function so separate variables. function fish($username){ $data = ""; $dbh=dbconnect() or die ('Fish error: ' . mysql_error()."<br>"); mysql_select_db("katarra_game"); $result = mysql_query("SELECT energy FROM users WHERE username = '" . mysql_real_escape_string($username) . "'") OR die(mysql_error()); if (mysql_num_rows($result) > 0) $data = stripslashes(mysql_result($result,0,"energy")); mysql_close($dbh); $data = str_replace("&#38;#39;","'",$data); return $data;} print fish('some username'); try that. make sure you enter a valid username for "some username"
  6. you should be fine when you output the data. make sure to test though.
  7. ummmm where is your query?? function fish($username){ $data = ""; $dbh=dbconnect() or die ('Fish error: ' . mysql_error()."<br>"); mysql_select_db("katarra_game"); if (mysql_num_rows($result) > 0) $data = stripslashes(mysql_result($result,0,"energy")); mysql_close($dbh); $data = str_replace("&#38;#39;","'",$data); return $data;} print fish('some username');
  8. can't you just call whatever that popup calls in the current page?
  9. if thats what the field is named in the db then yes.
  10. this is probably better suited for the x.com developer forums. basically you have no control over the PayPal IPN. It is based off the purchase order so as long as you send all the data to paypal for the order the data should be in the IPN. Do a print_r of the $_POST array to see what you get. Make sure your testing first in the sandbox. API Reference: https://cms.paypal.com/us/cgi-bin/?&cmd=_render-content&content_ID=developer/howto_api_reference IPN variables: https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_IPNandPDTVariables Hope that helps.
  11. any strings you input into a database need to be escaped. meaning quotes and special characters get formatted to db friendly values (ie. " or ' goes to \" and \'). This is so: -your code doesn't break -people don't try to inject into your database (search form injection for an example). here is what i do for all my queries: $sql = sprintf("INSERT INTO table (string_a,string_b) VALUES ('%s','%s','%s','%s')", mysql_real_escape_string($string), mysql_real_escape_string($string)); use sprintf to insert strings, ints, decimals etc to your sql string. use mysql_real_escape_string on strings to escape any special characters.
  12. so you just need to know how to embed a quicktime video?
  13. upload the images to a specific folder and just provide links to them in the email?
  14. well $var is the field that you want to get. so either do this: if (mysql_num_rows($result) > 0) $data = stripslashes(mysql_result($result,0,'field_name')); or just select the one field in your query and do this: $result = mysql_query("SELECT field_name FROM users WHERE username = '$username'"); if (mysql_num_rows($result) > 0) $data = stripslashes(mysql_result($result,0));
  15. that wont make a difference. where is $var defined? if (mysql_num_rows($result) > 0) $data = stripslashes(mysql_result($result,0,$var));
  16. second part looks fine. <?php include ("admin/connect.php"); $id_slike=$_GET['id_slike']; $sql = mysql_query("SELECT * FROM slike"); $rownr=0; while($row=mysql_fetch_assoc($sql)) { $rownr++; echo $rownr; } ?> what does it output? This is also a quick way to get the number of rows. $num_row = mysql_result(mysql_query("SELECT count(id_slike) FROM slike"),0);
  17. No i couldn't due to server restrictions ah i see. I saw a ZipArchive example but I hadn't heard of the ZipArchive class before so wasn't sure if it was part of PHP or not. How do you know if it's enabled or not? What is the flag?
  18. likely an error in your query. $result = pg_query($query) or die(mysql_error()); try that.
  19. can't you just use exec() to have the server do it? Never had to do this before but I assume that would work.
  20. $broj_slika=mysql_num_rows($rezultat); spelling mistake
  21. I think you want to use an OR in that statement $query = "SELECT * FROM web.events WHERE date_end >= '".date("m/d/Y")."' OR date_begin <= '".date("m/d/Y")."' ORDER BY date_begin ASC"; An event could start before today or tomorrow but end on these days. As well an event could start today or tomorrow but not end until after these days. Now that I look closer, even that looks wrong. I think you want this: $query = "SELECT * FROM web.events WHERE (date_end >= '".date("m/d/Y",$today)."' AND date_end <= '".date("m/d/Y",$tomorrow)."') OR (date_begin >= '".date("m/d/Y",$today)."' AND date_begin <= '".date("m/d/Y",$tomorrow)."') ORDER BY date_begin ASC"; That should get all events that either start or end today or tomorrow. I hope that's what you wanted. You will need to define $today and $tomorrow though.
  22. this will be faster. should work. $ultratotal = mysql_result(mysql_query("SELECT sum(topics) + sum(posts) as ultratotal FROM forum_forums"),0);
  23. <input type="checkbox" name="checkbox[]" value="<?php echo $row["id"]; ?>" <?php echo ($row['checkbox_value'] == 1) ? "CHECKED='CHECKED'" : ''; ?> /> I'm sure what your set value is for these checkboxes but I usually use 1. Basically check the checkbox value against whatever your set value is (1 in this case).
  24. the code looks fine. what do you mean by reset? do you want it to stop once it finds a value?
×
×
  • 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.