Posts
 
Reputation
Joined
Last Seen
Ranked #97
Strength to Increase Rep
+15
Strength to Decrease Rep
-3
84% Quality Score
Upvotes Received
207
Posts with Upvotes
179
Upvoting Members
96
Downvotes Received
54
Posts with Downvotes
53
Downvoting Members
8
130 Commented Posts
20 Endorsements
Ranked #71
Ranked #62
~767.50K People Reached
About Me

I am high on life !

Interests
Computers, music, playing with hitler(my "german" shepherd dog), cooking, long drives,…
PC Specs
I have a crappy computer.
Favorite Tags
Member Avatar for The Dude
Member Avatar for Duki
Member Avatar for evios

hmm.. AFAIK, only mysql uses port 3306. To check what ports are being used, open command prompt and type netstat -ab. It ll list all the applications and the ports used by those applications. Maybe that port is blocked by your firewall ?

Member Avatar for AnnDash
-1
16K
Member Avatar for galeej

@vipin_php, Next time, please put your code in [code=php ] [/code ] tags.

Member Avatar for Kevin_40
0
1K
Member Avatar for tryphy

[code=php] <?php $arr=array(); for($i=0;$i<7;$i++){ $arr[$i]="./img/images/".$i.".jpg"; //assigning the image location to the array $arr. } $random=rand(0,6); //generating a random number echo "<img src=".$arr[$random].">"; //printing the image ?> [/code] Thats it :)

Member Avatar for cereal
0
3K
Member Avatar for mrcniceguy

When the user logs in, check if its a valid login. If, yes, then query the table which has the user details for this username. Since this is a login script, username has to be unique. So, a username can have only 1 row of details. [code=php] <?php //connection //get …

Member Avatar for Carsten_1
0
7K
Member Avatar for csshacker

[code=php] <?php $filename ="excelreport.xls"; $contents = "testdata1 \t testdata2 \t testdata3 \t \n"; header('Content-type: application/ms-excel'); header('Content-Disposition: attachment; filename='.$filename); echo $contents; ?> [/code] This is the simplest way to generate an excel report.

Member Avatar for diafol
0
16K
Member Avatar for marjan_m

This simply wouldn't work because this is how your source would look like. [code] <input type= "text" name ="ch1" disabled='true' disabled='false'/> [/code]

Member Avatar for diafol
0
10K
Member Avatar for pranto157

[code=php] <?php $host="localhost"; // Host name $username="root"; // Mysql username $password=""; // Mysql password $db_name="forum"; // Database name $tbl_name="test_mysql"; // Table name // Connect to server and select databse. mysql_connect($host, $username, $password)or die("cannot connect"); mysql_select_db($db_name)or die("cannot select DB"); $sql="SELECT * FROM test_mysql"; $result=mysql_query($sql); $count=mysql_num_rows($result); ?> <table width="400" border="0" cellspacing="1" cellpadding="0"> …

Member Avatar for danie93007
0
759
Member Avatar for scorpionz

The problem is, [quote]if((!empty($_FILES["car_info_file"])) && ($_FILES['car_info_file']['error'] == [/quote] and all will not be accessible inside the function. Instead, pass $_FILES as parameter for the function. [code=php] upload_files($_FILES); [/code] Then you can access it in your function like, $fil['car_info_file']['name'] and so on.. Btw, type is application/xls..

Member Avatar for SuperGOAT
0
13K
Member Avatar for cy163

[quote] Please Bang dani Help me asap, i'll say thank' you and thanks Salam Open Source, please cc to my email <EMAIL SNIPPED> thx [/quote] :-O What the ....

Member Avatar for rpv_sen
0
11K
Member Avatar for padma525

Yep. If its a csv file, then you can make use of [url=http://nl3.php.net/manual/en/function.fgetcsv.php] fgetcsv [/url] to do the required operation.

Member Avatar for sankartomogo
1
3K
Member Avatar for dudegio

[quote](Incidentally, if you get the time, what exactly is the recommended code doing?) [/quote] [icode] ob_start() [/icode]. Its turning on the output buffer. So any output is kept in the buffer. And [icode]ob_flush() [/icode] is to flush the buffer :)

Member Avatar for nicheteam
0
14K
Member Avatar for Syntax12

If you want to count the number of records in the table, you can use mysql_num_rows. [code=php] $query = "select * from tablename"; $result = mysql_query($query); echo mysql_num_rows($result)." records found..."; [/code] If you want the number of columns in a particular table, [code=php] $query = "show columns from tablename"; $result …

Member Avatar for zein1212
0
335
Member Avatar for njagi

[code=php] <?php $file="test.xls"; $test="<table border=1><tr><td>Cell 1</td><td>Cell 2</td></tr></table>"; header("Content-type: application/vnd.ms-excel"); header("Content-Disposition: attachment; filename=$file"); echo $test; ?> [/code] This works.

Member Avatar for swss
0
3K
Member Avatar for rajeesh_rsn

[url]http://davidwalsh.name/backup-mysql-database-php[/url] A good script to backup the whole database or just a few selected tables. Note: While generating the backup file, he uses the command drop tablename. You better ignore (comment) that line :) Edit: I somehow missed 'excel' in your post. This takes the backup on a .txt file …

Member Avatar for arslanqamar
0
771
Member Avatar for lydia21

If you want current date and time to insert to a table, you can use now() function of mysql. [url]http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_now[/url]

Member Avatar for kharthikeyan
0
3K
Member Avatar for duttydea

[QUOTE=duttydea;626807] How can i add the data from the array to a Mysql table?[/QUOTE] If you have a multidimensional array (or even a normal array), you should go through each and every element of the array (iterate it) and then insert the value to the table. For example, [code=php] $array …

Member Avatar for diafol
0
2K
Member Avatar for Doctor Inferno
Member Avatar for sk8ndestroy14
Member Avatar for jtreyes

[code=php]<?php if(isset($_POST['submit'])){ $name = $_POST['name']; $age = $_POST['age']; //insert into table } ?> <html> <body> <form name="test" method="post" action="samepage.php"> Name: <INPUT TYPE="text" NAME="name" value="<?php echo $name ?>"><br /> Age: <input type="text" name="age" value="<?php echo $age ?>"><br /> <INPUT TYPE="submit" name="submit" value="submit"> </form> </body> </html>[/code] This is just an example program. …

Member Avatar for janetkissho
0
3K
Member Avatar for searchacar

I have not checked your query. But this will work. [code=php] $query="select * from table where date_column between "2001-01-05" and "2001-01-10";[/code] This will print all the records where the date_column value lies between the first date and the second date.

Member Avatar for angiesavio
0
9K
Member Avatar for OmniX

Order by multiple columns work this way. For example, you have 4 records. [quote] field1 | field2 | field3 | field4 -------+-------+--------+---------- 1 | 1 | 2 | 4 ------------------------------------- 2 | 2 | 100 | 5 ------------------------------------- 3 | 2 | 1 | 3 ------------------------------------- 4 | 3 | …

Member Avatar for Ashton_1
0
289
Member Avatar for akshit
Member Avatar for TomH.PG
0
8K
Member Avatar for csshacker

[code=php] <?php $filename ="excelreport.csv"; $contents = "testdata1;testdata2;testdata3; \n"; header('Content-type: application/ms-excel'); header('Content-Disposition: attachment; filename='.$filename); echo $contents; ?> [/code] I had given a similar example in another thread. Well, csv or excel, the procedure is the same.

Member Avatar for diafol
1
608
Member Avatar for NitinThacker

maybe you should check previous posts. But anyway, when you submit a form(for example,form1.php), post all the variables to another page(form2.php), add those variables to another variable, say $message and use mail function to send the mail. More on mail function [url=http://in2.php.net/manual/en/function.mail.php]Here[/url].

Member Avatar for missy_mi
0
2K
Member Avatar for dottomm

[quote] $_FILES['uploadedfile']['name'] [/quote] Shouldn't this be $_FILES['photo']['name'] :)

Member Avatar for earlxph8
-1
20K
Member Avatar for janzaldo

$user_id=$_POST['UserID']; $password=$_POST['Password']; $query="select * from Customer where UserID = '$user_id' and Password = '$password'"; echo $query; $result=mysql_query($query) or die(mysql_error()); Check what $query prints. Execute the same in phpmyadmin. oh, and please, next time you post your code, put it in [code] tags.

Member Avatar for sudhir1234
0
2K
Member Avatar for Stefano Mtangoo

Pretty simple. Fetch the data from the database and place it between <textarea> tags. Here is an example. [code=php] <?php if(isset($_POST['save'])) { print "<pre>"; print_r($_POST); print "</pre>"; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Full featured example</title> <!-- TinyMCE --> <script type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script> <script …

Member Avatar for medzoner
0
4K
Member Avatar for kings

Umm.. you are passing the id as a parameter. Why are you trying to assign the value of $id to t (in javascript function) ? [code=php] <html> <head> <SCRIPT LANGUAGE="JAVASCRIPT" TYPE="TEXT/JAVASCRIPT"> <!-- function login(t) { alert(t); } --> </SCRIPT> </head> <body> <?php $id=$_GET['id']; print "<input type='button' name='button' value='button' onClick=login('$id')>"; ?> …

Member Avatar for vkey
0
1K