Jump to content

aruns

Members
  • Posts

    57
  • Joined

  • Last visited

    Never

Everything posted by aruns

  1. Got a solutions, Thanks Guys
  2. Hi Guys, How can i set two background color top a bottom positions for a LI tag. Thanks in Advance.
  3. aruns

    strtotime

    $todays_date = strtotime("now"); use like this
  4. file_get_contents is the easiest way to crawl data ., but curl is secure and fast ..
  5. As your code <?php $name = $_POST['name']; $uname = $_POST['uname']; $email = $_POST['email']; $pwd = $_POST['pass']; $up = $_POST['fileToUpload']; $id= $_POST['id']; if(!empty($_FILES['fileToUpload'])) { if($_FILES['fileToUpload']['type']=="image/jpeg"); { $dest = "images/{$id}.jpg"; if (move_uploaded_file($_FILES['fileToUpload']['tmp_name'],$dest)) { $a .=",userphoto ='{$dest}'"; print "File successfully uploaded"; } } } $q .= " WHERE userID='{$id}'"; require_once("dbconnect.php"); $insert ="INSERT INTO users (name,username,emailadd,password,userphoto) VALUES ('{$name}','{$uname}','{$email}',SHA1('{$pwd}'),'{$dest}')" ; mysqli_query($conn,$insert); if(mysqli_affected_rows($conn) <= 0) { print "Unable to create account.Please <a href='reg.html'>click here</a>to try again."; } else { mysqli_close($conn); header("Location:login.php?sebab=newreg"); exit(); } mysqli_close($conn); ?>
  6. use this $num=mysql_num_rows($result); insteed of $num=mysql_numrows($result); bcoz you dont have declaration in your lib for mysql_numrows
  7. <script type="text/javascript"> var usererror = ""; //NULL STRING var passerror = ""; //NULL STRING function CheckUsername() { var usererror = "Test"; document.getElementById("showError").innerHTML = usererror; } function UpdateError() { setTimeout("UpdateError()",1000); } </script> </head> <body> <div class = "template"> <form action = "" method = "post" name = "formlogin"> <table> <tr> <td width = '30%'>Username</td> <td width = '40%'><input type = "textfield" name = "username" onchange = "UpdateError();"/></td> <td width = '30%' style = "color:red;" id="showError"> </td> </tr> </table> </form> </div>
  8. $allowed = array("jpg", "jpeg", "gif", "png"); Try this., you may avoid JPEG issues list($name, $ext) = explode(".", $_FILES['file']['name']); if(in_array(strtolower(ext), $allowed)) { // Your code here }
  9. use this echo($_SERVER['HTTP_REFERER']);
  10. $qry = mysql_query("INSERT INTO Members (firstname,lastname,country,Email) values ('".addslashes($_POST["firstname"])."','".addslashes($_POST["lastname"])."','".addslashes($_POST["country"])."','".addslashes($_POST["email"])."')"); // redirecting to success screen if($qry){ header("Location: login.php"); }else die(mysql_error());
  11. Save User id When user is logged in like this... $query = mysql_query("SELECT * FROM users WHERE username = '$username' and password = '$password'")or die("Error:" . mysql_error()); $rlt = mysql_fetch_array($query); $count = mysql_num_rows(); if($count == 1){ session_register("username"); $_SESSION['USERID'] = $rlt['id']; }else{ echo "Invalid USer....."; } $qry = mysql_query("SELECT * FROM users WHERE id = '".$_SESSION['USERID']."'")or die("ERROR:" . mysql_error()); $rst = mysql_fetch_array($qry); extract logged in user data through $rst
  12. aruns

    Need help on image

    Hi Guys, Presently i am doing Internet TV website using media player . What my problem is I want a Full Screen image button on Media Player center part. I tried a lot someone help me .Here is I used code <div style="position: absolute; top: 330px; left: 440px; border: none;"><a href="#" onClick="javascript:fullScreen();"><img src="images/play_fullscreen.gif" border="0"></a></div> <object id="Player" name="Player" width="667" height="492" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" standby="Loading Video..." type="application/x-oleobject" style=" position:absolute;"> <param name="stretchToFit" value="1" /> <param name="uiMode" value="mini" /> <param name="URL" value="http://xxxx.tv/stream.php?file=<?php echo $file; ?>" /> <param name="currentposition" value="19" /> <param name="AllowChangeDisplaySize" value="1" /> <param name="AutoSize" value="0" /> <param name="fullScreen" value="0"> <param name="DisplaySize" value="4" /> <param name="ShowControls" value="1" /> <param name="showstatusbar" value="1" /> <param name="AutoRewind" value="0" /> <param name="autoStart" value="1" /> <param name="volume" value="100" /> <embed name="Player" uimode="mini" src="http://xxxx.tv/stream.php?file=<?php echo $file; ?>" type="application/x-mplayer2" width="667" height="492" showstatusbar="1" showcontrols="1" currentposition="19" autosize="0" autostart="1" volume="100" stretchtofit="1" displaysize="4" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/" style="position:absolute;"></embed> </object>
  13. Hi Guys, I have little bit doubt. I have format 00:06:00 how to i convert into 360.. If any functions, I dont know how to do that ..Help me :'( Thanks
  14. I am Getting this Error : Warning: Missing argument 1 for SessionHandler::read(), called in C:\xampp\htdocs\packs\test.php on line 66 and defined in C:\xampp\htdocs\packs\test.php on line 32 Warning: mysql_query(): 2 is not a valid MySQL-Link resource in C:\xampp\htdocs\packs\test.php on line 33
  15. <?php class SessionHandler{ var $_conn; public $_server; public $_user; public $_password; public $_db; function SessionHandler($_server = "", $_user = "", $_password = "", $_db = ""){ $this->_server = $_server; $this->_user = $_user; $this->_password = $_password; $this->_db = $_db; } function open(){ $this->_conn = mysql_connect($this->_server, $this->_user, $this->_password)or die(mysql_error()); if($this->_conn){ return mysql_select_db($this->_db, $this->_conn); } } function close(){ return mysql_close($this->_conn); } function read($id){ $sql = mysql_query("SELECT session_data FROM sessions WHERE session = '$id'", $this->_conn)or die(mysql_error()); if(mysql_num_rows($sql) > 0){ $data = mysql_fetch_array($sql); return stripslashes($data[session_data]); }else{ return ""; } } function write($id, $data){ $clean_data = addslashes($data); $expires = time() + ini_get("session.gc_maxlifetime"); $query = "INSERT INTO sessions(session, session_data, session_expires)VALUES('$id', '$data', '$expires')"; $sql = mysql_query($query); if(!$sql){ $query = "UPDATE sessions SET session = '$id', session_data = '$data' WHERE session_expires > '" . time() . "'"; $sql = mysql_query($query); } return $sql; } function destroy($id){ $query = "DELETE FROM sessions WHERE session = '$id'"; return mysql_query($query); } function gc($max){ $query = "DELETE FROM sessions WHERE session_expires < '" . time() . "'"; return mysql_query($query); } function set_handler(){ ini_set('session.save_handler', 'user'); session_set_save_handler($this->open(), $this->close(), $this->read(), $this->write(), $this->destroy(), $this->gc()); if(session_id() == ""){ session_start(); print session_id(); } } } $obj = new SessionHandler(); $obj->_server = "localhost"; $obj->_user = "root"; $obj->_password = "123456"; $obj->_db = "fairy"; $obj->set_handler(); ?>
  16. Hi Guys, Anybody Known about connection_aborted, connection_status, connection_timeout. Where, How, Why these function are use... Thanks
  17. aruns

    Hi Guys

    I want to compare the three fields. I mean product_name, price, quantity are same its duplicate.. how to i get it
  18. aruns

    Hi Guys

    product1 40 $9.98 $399 $0 $399 Order Now 0 stars product2 50 $9.38 $469 $0 $469 Order Now 0 stars product1 40 $9.98 $399 $0 $399 Order Now 0 stars product2 50 $9.38 $469 $0 $469 Order Now 0 stars product2 50 $9.38 $469 $0 $469 Order in this list product2 as two times repeated look like this i want a list of products which of the products are repeated...
  19. aruns

    Hi Guys

    Hi Guys , I have a problem please Help me . i have duplicate records from my MYSQL database Duplicate record means same price, same quantity and same product.. help me how to i get this list...
  20. mysql_query("select a.products_name, a.products_id, b.products_id, b.products_price from products_description a, products b where a.products_id = b.products_id and b.products_price = '$price' and a.products_name = '$name'")or die("Error : " . mysql_error()); anybody help me whats the problem in my query...?
  21. Thank you for the replay... If any options to delete folder....
  22. Hello Guys, This function was i am using to dynamic delete folder but it says Warning: rmdir(xxxxxxxxx) [function.rmdir]: Permission denied in ############## on line 96.... Help me i am worry about that.... function delete_folder($ftp_path){ if(is_dir($ftp_path)){ $folder_files = get_all_contents($ftp_path); for($i=0; $i<=count($folder_files); $i++){ if(is_file($folder_files[$i])){ unlink($folder_files[$i]); }elseif(is_dir($folder_files[$i])){ delete_folder($ftp_path . $folder_files[$i]); } chmod($ftp_path, 0777); return rmdir($ftp_path); } } }
  23. Hi Guys, Here is my htaccess code.It loads a web page good but the web page cannot load css files and images <ifModule mod_rewrite.c> RewriteEngine on RewriteRule ^source/electronics/?$ /?target=source&id=1 [L,QSA] </ifModule>
×
×
  • 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.