Posts
 
Reputation
Joined
Last Seen
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
20% Quality Score
Upvotes Received
2
Posts with Upvotes
2
Upvoting Members
2
Downvotes Received
9
Posts with Downvotes
7
Downvoting Members
7
2 Commented Posts
0 Endorsements
Ranked #10.5K
Ranked #4K
~46.3K People Reached
Favorite Tags

21 Posted Topics

Member Avatar for hankmeyer

use die(mysql_error()) next to mysql_query(). Due to this you can check your query runs correctly or not. Before insert values into ddatabase, just echo the values wheather it display or not. If it displayed, then you need to find error on your query

Member Avatar for shafakhat91
0
9K
Member Avatar for metalix

You can use this code to upload images to database using PHP <form action="#" method="post" enctype="multipart/form-data"> File: <input type="file" name="file"> <input type="submit" name="submit" value="Upload"> </form> <?php if(isset($_POST['submit'])) { mysql_connect('localhost','root',''); mysql_select_db('new'); $name=$_FILES['file']['name']; $type=$_FILES['file']['type']; if($type=='image/jpeg' || $type=='image/png' || $type=='image/gif' || $type=='image/pjpeg') { if(file_exists(dirname($_SERVER['DOCUMENT_ROOT']).'/oops/upload/image/'.$name)) { echo'file is already present'; } else { $up=move_uploaded_file($_FILES['file']['tmp_name'],dirname($_SERVER['DOCUMENT_ROOT']).'/oops/upload/image/'.$name); …

Member Avatar for guruparthi
0
1K
Member Avatar for ebanbury

use this code <?php header("Content-Type: application/rss+xml; charset=ISO-8859-1"); echo '<?xml version="1.0" encoding="UTF-8" ?> <?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?> <?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?> <rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"> <channel> <title>title</title> <link>http://www.sample.com</link> <description>Description</description>'; $connection = @mysql_connect('localhost', 'root', '') or die(mysql_error()); mysql_select_db('new') or die (mysql_error()); $query = "SELECT * FROM links …

Member Avatar for guruparthi
0
1K
Member Avatar for jennia1686

User-agent: * Disallow: / Now, the search engine don't crawl and index your pages. You add this code to your robots.txt file. Your robots.txt file should be present in root directory of your websites

Member Avatar for Ketul_1
0
187
Member Avatar for axier

<?php if(isset($_POST['submit'])) { $mail=$_POST['mail']; $q=mysql_query("select * password from register where mail='".$mail."' ") or die(mysql_error()); $res=mysql_fetch_assoc($q); $password=$res['password']; $msg='Your password is '.$password; $sub='Send password'; $header='From: your mail id'; $m=mail($mail,$sub,$msg,$header); if($m) { echo'check your mail'; } } ?>

Member Avatar for guruparthi
0
8K
Member Avatar for ohgosh

Order by and group by are totally different. **Order by** It is used to sort the table values ascending and descending order for ex: select * from table_name order id desc where, fields are sorts descending order **Group by** It is used to display distinct values on table. It eliminate …

Member Avatar for guruparthi
0
387
Member Avatar for hermanSA

SELECT * FROM ( SELECT * FROM `mail` ORDER BY send_date DESC ) t GROUP BY message_id

Member Avatar for guruparthi
0
632
Member Avatar for dopeynite
Member Avatar for Tess James

**Insert into table2 (column_name1, column_name2) select column_name1, column_name2 from table1 where column_name1='value'**

Member Avatar for guruparthi
0
6K
Member Avatar for uselessninja

<form action ="#" method="post" > <input type ="text" name="name" /> <input type ="submit" name="submit" value="submit" /> </form> <?php if(isset($_POST['submit'])) $link = mysql_connect("localhost","root","") or die(mysql_error()); mysql_select_db("db_name") or die(mysql_error()); $result = mysql_query("insert into tablenmae values('".$_POST[name]."')") or die(mysql_error()); if($result) { echo "values inserted."; } else { echo'Not inserted'; }

Member Avatar for diafol
0
311
Member Avatar for mangopearapples
Member Avatar for guruparthi
0
360
Member Avatar for Namibnat

You've to check your query first wheather it gives answer or not. $result = mysql_query("SELECT * FROM stadium WHERE gametime = `$_z`") or die(mysql_error()); $row = mysql_fetch_row($result); $bababa[name] = $row[0]; $bababa[town] = $row[1]; $bababa[playingA] = $row[2]; $bababa[playingB] = $row[3]; $bababa[3] = $row[4];

Member Avatar for guruparthi
0
725
Member Avatar for martinkorner
Member Avatar for anil14353

You will try to use this RewriteRule ^(.*)$ profile.php?username=$1 [L] Then in your profile.php $username=$_GET['username'];

Member Avatar for Bachu
0
4K
Member Avatar for filipgothic

It means your query contains white space. To avoid this problem you need to add **mysql_real_escape_string($val)** ie, mysql_query("select id from grupe where grupanaziv ='".mysql_real_escape_string($grupa_select)."'");

Member Avatar for filipgothic
0
3K
Member Avatar for [NOPE]FOREVER

**GET:** When you submit a form usig GET method, you can see the values you entered in address bar. For example, you enter your user name and password, You can see it on address bar. So its not a secure way. To avoid this problem. you have to use POST …

Member Avatar for DJBirdi
4
160
Member Avatar for nadiam

This is the query for copy values from one table to another in mysql Insert into table2 (column_name1, column_name2) select column_name1, column_name2 from table1

Member Avatar for guruparthi
0
2K
Member Avatar for zein1212
Member Avatar for guruparthi
0
256
Member Avatar for cdes1145

Your mysql query return no values. So you got this error. To avoid this error, you need to add die(mysql_error()) after your query ie, mysql_query("select * from tbl_name") or die(mysql_error()); If the query is not correct, then it give error message. Now you can know whether your query return values …

Member Avatar for guruparthi
0
662
Member Avatar for Aruna R

**mysql_fetch_array:** Mysql_fetch_array() returns row as an associative, numeric array or both based on parameters passed in it. Three types of parameters can be passed in mysql_fetch_array function. 1. MYSQL_BOTH - return both associative and numeric array 2. MYSQL_ASSOC - return associative array 3. MYSQL_NUM - return numeric array **mysql_fetch_assoc():** It …

Member Avatar for guruparthi
0
7K
Member Avatar for smith09

Robots.txt is a text file which is used to instruct the search engines for how to crawl and index the pages on your site. The search engines should be obey the robots.txt. The search engine follow the instruction specified by robots.txt file. If you want to some of your pages …

Member Avatar for backendcode
1
471

The End.