Jump to content

UnknownPlayer

Members
  • Posts

    269
  • Joined

  • Last visited

    Never

Everything posted by UnknownPlayer

  1. Thanks, it works.. I had this example in other script, and it worked, but now in this exmaple it doesn't work.. Thanks again..
  2. I have this code, but it doesn't work: $input = "http://loombo.com/tg6nuw42yahw"; $search = "/http:\/\/(?:www\.)?loombo\.com\/(.*?)/is"; $replace = "<iframe style='overflow: hidden; border: 0; width: 500px; height: 351px;' src='http://loombo.com/embed-$1-500x316.html' scrolling='no'></iframe>"; echo preg_replace($search,$replace,$input); Now this address in iframe should be: http://loombo.com/embed-tg6nuw42yahw-500x316.html, but it isn't. When i look at souce code of page, address in that iframe is http://loombo.com/embed-[empty]-500x316.html Can someone help me?
  3. Can someone give me name of free shopping cart with auctions(offers) like Open Classifieds ?
  4. Can someone give me name of auctions and buy it now cart in one, but if there exist free.. And for only Auctions..
  5. I wonna to upload photo with js and ajax.. i can do inserting something in mysql, but i dont know how to do with files :/ Form: <form enctype="multipart/form-data" method="get"> <center> <label>Title: <input type="text" name="s_name" value="" style="width:250px" /></label> <label>Image: <input type="file" name="s_image" style="width:250px" /></label> <input class="button" type="submit" name="s_add" value="Add" style="width:100px" OnClick="save();" /> </center> </form> This is js code: function save() { col = document.getElementById("new"); if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { col.innerHTML = xmlhttp.responseText; } } xmlhttp.open("GET","sources/save.php?i dont know what to insert here,true); xmlhttp.send(); } this is save.php: <?php $allowed_size = 204800; $name = $_GET['name']; $name = $_GET['image']; $date = time(); if (save_img($up_imgfile, $up_imgname, $allowed_size)) { $query = "INSERT INTO table (name, image, date) VALUES ('{$name}', '{$image}', '$date')"; $result = mysql_query($query, $connection); if ($result) { echo "<p class='warn-green'>$season_name has been successful added</p>"; } else { echo "<p class='warn-red'>Error: $season_name is not added, try again.</p>"; } } } ?> save_img() is php function to upload photo and make thumb.. How can i do this thing to do this function, but i need this: $up_imgname = $_FILES['s_image']['name']; $up_imgfile = $_FILES['s_image']['tmp_name']; Becouse of that i cant do this, how can i get temp name, image name of uploaded file ?
  6. I made a foreign key and now it works..
  7. Hi, i need help with command to delete id from episodes and episode_links, when delete season.. I have this table: Season(for tv shows): where i have id, name, date fields Episodes: where i have id, season_id, name, date fields Episode_links: where i have id, episode_id, link, date fields Now i need help with command, when i delete season with id 1, to delete episodes where season_id is 1 and to delete episode_links where episode_id is id from table episodes where season_id = 1 ? If you understand me, please help me ? I tried with this: $season = $_GET['season']; $query = "DELETE FROM seasons WHERE id = '$season'"; $result = mysql_query($query, $connection); if ($result) { $query = "DELETE FROM episodes e, episode_links l WHERE e.season_id = '$season' AND l.episode_id = e.id"; $result = mysql_query($query, $connection); } but it doesn't work :/
  8. Im just trying to use that javascript code, but i can make same code which i use in javascript/ajax command.. Thanks..
  9. How can i run this javascript command show_seasons(some_value), in php code, i mean without any action ? I have this php code: if ($sid == $s_id) { javascript:show_seasons($sid); } How to do that? Thanks..
  10. Still same :S Can u give me example of sending content with post method ?
  11. I cant use that, i tryed :S But i can use this: var post_text = document.getElementById('commentBox').value.replace(/\n/g,'<br />'); becouse when i send data to php file to write in mysql it recive texti without tags :S
  12. Hi, i need help with sending text with new rows(nl2br() func in php). When i do this: xmlhttp.open("GET", "send_post.php?content="+post_text, true); post_text is text with new rows, but in send_post.php i take that variable from $_GET and write that text to mysql, but there are no new rows :S Example text: some text here .. it will write it to mysql like this: sometexthere
  13. I dont get any error :S post_text is getting this value: [object HTMLTextAreaElement] :/ but this code works: var post_text = document.getElementById('pp').value; But POST method doesn't work :S Can someone help me ?
  14. In that way, both does not work :S I mean css does not work in /post/ and in index.php
  15. I have this form: <textarea id="pp" name="post_text" rows="1" cols="50"></textarea><br /> <input type="submit" value="Post" onClick="postit()" /> <div id="posted"></div> this is postit() js code: <script type="text/javascript"> function postit(){ var post_text = document.getElementById('pp'); if (post_text != "") { if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else { // code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("posted").innerHTML=xmlhttp.responseText; } } var data = "content="+post_text; xhr.open("POST", "send_post.php", true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.send(data); } } </script> .. and this is send_post.php code: <?php include("includes/connection.php"); ?> <?php $content = $_POST['content']; $content_date = time(); $query = "INSERT INTO wallposts (post, date) VALUES ('{$content}', '$content_date')"; $result = mysql_query($query); echo "Posted"; ?> Now, js code gets in post_text var, text of "pp" input value, but it wont send it to send_post.php(POST method) and write at mysql :S Can someone help me? Thanks..
  16. When i use: <link href="styles/styles.css" rel="stylesheet" type="text/css" /> my addresses like index.php works, but address like /post/ does not work :S i mean css do not works on /post/ in this way When i use: <link href="../styles/styles.css" rel="stylesheet" type="text/css" /> then address like /post/ work, but address like index.php does not work :S i mean css do not works on index.php in this way This is my .htaccess code: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^post/([0-9]+)$ post.php?pid=$1 [L] How can i find solution to both works ? :S
  17. But 1 more thing, can u tell me why u said to dont use class ? :S And how to do that, to make .fb into id ?
  18. I putted this my-centered-div, and it works fine
  19. And before <div id="fb"> to put <div id="my-centered-div"> ?
  20. Thanks.. it is easier to put only registred members.. But i thought to set that for the start :S
  21. Can someone help me with this div: .fb { color: #333; width: 600px; padding: 5px; background-color: #f7f7f7; border: 1px solid #b7b7b7; } That div is main div, but it is not centered, can someone tell me what should i add to make it on center? btw in attachment is compressed template.. Thanks. [attachment deleted by admin]
  22. Is there any css template for facebook, i mean for wallposts, like http://likeator.com/ ?
×
×
  • 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.