1,741 Posted Topics

Member Avatar for bigbob
Member Avatar for nav33n
0
202
Member Avatar for techker

[url]http://w3schools.com/php/php_mysql_insert.asp[/url] Check out the example. I think this is what you are looking for!

Member Avatar for nav33n
0
71
Member Avatar for Kavitha Butchi

Everything is fine in the above posted code. The only line which gave me an error was this line. [icode]$ext = $this->getExtension($img_name);[/icode] Remove $this and everything will work great !

Member Avatar for Kavitha Butchi
0
403
Member Avatar for Killer_Typo
Member Avatar for michael.mckee
0
3K
Member Avatar for Zemfik

Well, these people have already told you which one is better and why. Here are my 2 cents. The maintenance of a php site is much cheaper than a asp.net site. (1st advantage for your client). The web hosting is also cheaper for php when compared to asp.net (2nd advantage …

Member Avatar for msteudel
0
126
Member Avatar for MDGM

[code=php] if(empty($_REQUEST['hiddenfieldname'])) { echo "Blah"; } else { echo $_REQUEST['hiddenfieldname']; } [/code] Like this ?

Member Avatar for MDGM
0
91
Member Avatar for colcar2008

[url]http://www.tizag.com/phpT/fileupload.php[/url] If you notice, $target_path is the path where the image is being uploaded. Save $target_path in the database :) Btw, If you search Daniweb, you will find plenty of threads on the same question !

Member Avatar for peter_budo
0
78
Member Avatar for zeeshan359

Mark inappropriate threads (like this one) as "Bad post". Moderators will take care of these ad guys! ;)

Member Avatar for peter_budo
-2
80
Member Avatar for ztwalsh

I totally agree with Kkeith29. Having different tables for each movie is not a good idea. If you plan to implement something, for example, a "database search" for a movie name, would you go through each and every table ? Anyway, If you want all the tables in the database, …

Member Avatar for nav33n
0
75
Member Avatar for fm_hyudin

If you observe your query in any good editor, you will see the 'missing' factor. The last variable '$manufacture of' is causing the error. A variable name cannot have a white space. For example, [b]$variable name[/b] is NOT a valid variable name. It should be [b]$variablename[/b]. Thats the error.

Member Avatar for nav33n
0
70
Member Avatar for CoolGamer48

Your mail function is perfectly fine. Does it give you any error other than "Failure" ? Umm..have you disabled error reporting ? Have you set sendmail path in php.ini ? usually, [icode] /usr/sbin/sendmail [/icode] is the path for sendmail.

Member Avatar for nav33n
0
99
Member Avatar for Visualogic

If you want to add numbers, try [icode]total = parseInt(form1.balance.value) + parseInt(form1.buy.value); [/icode]

Member Avatar for nav33n
0
252
Member Avatar for punithapary

LAMP is nothing but Linux Apache Mysql Php. WAMP is a windows package which has preconfigured apache, mysql and php. You just have to install Wamp on a computer with Windows OS.

Member Avatar for nav33n
0
42
Member Avatar for razer.anthom

Try giving the session a name.. [url]http://nl3.php.net/manual/en/function.session-name.php[/url]

Member Avatar for nav33n
0
223
Member Avatar for isomillennium

I am not sure if its possible in Php. But its definitely possible in javascript. [code=javascript] <html> <head> <script type="text/javascript"> function getformname(form) { alert(form.name); return false; } </script> </head> <body> <form name="test" action="test.php" method="post" onsubmit="javascript: return getformname(this);"> <input type="submit" name="submit" value="submit"> </form> </body> </html> [/code] Cheers, Nav

Member Avatar for sDJh
0
104
Member Avatar for Vity

[quote]Sanitizing user input means stripping the posted data from anything that may be malicious[/quote] You can use [url=http://nl3.php.net/mysql_real_escape_string]mysql_real_escape_string [/url] for the user input or [url=http://nl3.php.net/manual/en/function.addslashes.php]addslashes. [/url]

Member Avatar for Vity
0
450
Member Avatar for Pavlos1316

Well, when you submit the form, only the selected checkboxes will be posted to the next page. You can see what values are being posted by using [icode] print_r($_POST['checkboxname'] [/icode] You can loop through $_POST['checkboxname'] (since that will be an array of checked values) and display the data however you …

Member Avatar for Pavlos1316
0
87
Member Avatar for Sheridan

Oh, You can access the values as [icode]$value = $_GET['variablename'] [/icode] Don't forget to sanitize the user's input by using mysql_real_escape_string or addslashes.

Member Avatar for silviuks
0
269
Member Avatar for tahir_bsit

Thats because of the first line of your code. The javascript redirection. Everytime you open the page, it will see if the session variable is set. Obviously, it will be empty. So it keeps redirecting :)

Member Avatar for silviuks
0
134
Member Avatar for forwardlookguy

[icode] $variable = $_POST['form_variable_name']; [/icode] More about it here. [url]http://w3schools.com/php/php_post.asp[/url] You should sanitize user's input by using [url=http://nl3.php.net/mysql_real_escape_string] mysql_real_escape_string [/url] or [url=http://nl3.php.net/manual/en/function.addslashes.php] addslashes [/url].

Member Avatar for silviuks
0
145
Member Avatar for ryy705

Umm.. No.. mysql_query returns different values for different queries. I just tested and I found out, for a query which doesn't return any resultset, like, update or delete,returns just true. But for a select query, it returns a result (resource id).

Member Avatar for ryy705
0
114
Member Avatar for Kraai

Hmm.. I am not sure if your site is hacked.. But when that javascript was 'decoded', it gave me the url, [url]http://www.wp-stats-php.info/[/url] . The complete URL was [quote] <iframe src=http://www.wp-stats-php.info/iframe/wp-stats.php width=1 height=1 frameborder=0> [/quote] Umm.. Have you seen this iframe before ? I have never been in this position before, …

Member Avatar for Kraai
0
183
Member Avatar for dele454

You can set a cron job to run on the 1st day of every month (or the last day of every month) and execute the required script to generate the report.

Member Avatar for dele454
0
80
Member Avatar for gptArun

I haven't used PDO classes. But maybe a "return" in the connect function will do the trick ? [code=php] public function connect() { $pdoConnect = new PDO($this->dsn, $this->username, $this->password); return $this->connection = $pdoConnect; } [/code]

Member Avatar for darkagn
0
215
Member Avatar for yara1

Here is the idea. Pass the id of the image in the query string. [icode] <a href='deleteimage.php?id=4'>Delete now </a> [/icode] Then, in deleteimage.php, get the id, and delete the image. [code=php] //connection $id = mysql_real_escape_string($_GET['id']); $q = "delete from table where imageid = '$id'"; // if you are storing the …

Member Avatar for nav33n
0
76
Member Avatar for kevin wood

[code=mysql] update table set number=number+300 where condition; [/code] You mean like this ? Edit: Or are you talking about concatenation ? [code=mysql] update table SET number = concat( number, "00" ) WHERE condition; //this will concat 00 to the value in number field for that condition [/code]

Member Avatar for nav33n
0
79
Member Avatar for servis

Your script looks good. But are you sure you have a varchar field in the table called user_password with length greater than 16 characters ? Thats the only thing that I can think of. [url]http://dev.mysql.com/doc/refman/5.0/en/password-hashing.html[/url]

Member Avatar for nav33n
0
134
Member Avatar for kevin wood

Doesn't this work ? [code=php] <?php $merc_list = explode(",",$merc_mailingList); for($i=0; $i<count($merc_list); $i++) { if($i <=200) { //send mail } else { //you can't send any more mails today } } echo "200 out of ".count($merc_list)." mails have been sent today !"; ?> [/code]

Member Avatar for kevin wood
0
647
Member Avatar for assgar

You can do this. [icode]<input type="text" name="firstname" value="<?php echo $_POST['firstname']; >?"> [/icode]

Member Avatar for assgar
0
144
Member Avatar for assgar

> Hi > > I would like to put a list of ids in an array > and loop to select data from a table using > "IN" in the where clause. > > I am not having any success getting this to work. > Any suggestions? > > > …

Member Avatar for assgar
0
121
Member Avatar for itsense
Member Avatar for itsense
0
111
Member Avatar for oku

You can make use of max function to get the maximum value. [url]http://nl3.php.net/max[/url] This would be easy if you store the scores in an array and use max to get the maximum value.

Member Avatar for oku
0
102
Member Avatar for majestic0110

<offtopic> Cscgal, everytime I see your profile, I see different "solved threads" count ! Sometimes its 109, sometimes 110 and now its 108 ! :-/ how and why ? </offtopic>

Member Avatar for Dani
0
155
Member Avatar for tanha
Member Avatar for jilly
Member Avatar for heels

[url]http://www.w3schools.com/PHP/php_mysql_intro.asp[/url] That should help! :)

Member Avatar for heels
0
234
Member Avatar for jencinas69

This works perfectly fine for me. [code=php] <?php $list = array("ID,Category,Description"); $file = fopen("./csv/DS20080507.csv","a+", 1000); foreach ($list as $line) { fputcsv($file,split(',',$line)); } fclose($file); $row = 1; $handle = fopen("./csv/DS20080507.csv", "a+"); for($i=1;$i<10;$i++) { fwrite($handle,"test1,\t test2, \t test3 \t\n"); } fclose($handle); $handle = fopen("./csv/DS20080507.csv", "r+"); while (($data = fgetcsv($handle, 1000, ",")) !== …

Member Avatar for jencinas69
0
123
Member Avatar for mikki2

I haven't done anything of this kind before. How bout storing the users comments in a table ? The blogger can decide what to publish and what to delete just by the click of a button ? After all, you need a table to store the comments. You can have …

Member Avatar for nav33n
0
88
Member Avatar for Kristyne
Member Avatar for crabby1
Member Avatar for kathmatazz
Member Avatar for stocky
0
132
Member Avatar for Vai

If only admin's details are stored in admin table, then you don't need to change anything. But if the table is used for all the users, then for relevancy, you can have your table name as users. Why not make id of contacts table a foreign key ? So, for …

Member Avatar for Vai
0
84
Member Avatar for isomillennium

Try this. [code=php] //php.class.php <?php class page { var $title; var $keywords; var $content; function display() { $x="<html>\n<head>"; $x.=$this->displaykeywords(); $x.=$this->displaytitle(); $x.="</head>\n<body>"; $x.=$this->content; $x.='</body>'; $x.='</html>'; return $x; } function displaytitle() { echo '<title>' . $this->title . "</title>\n"; } function displaykeywords() { echo '<meta name="keywords" content="' . $this->title . '">'; } function …

Member Avatar for nav33n
0
92
Member Avatar for james595832

Print the query and execute it in mysql console/phpmyadmin. There is something wrong with your query. Please use code tags next time, as it will be easy for us to go through your code.

Member Avatar for pzuurveen
0
306
Member Avatar for Suhacini

You need to store the values in a table when someone votes. In that way, a user can vote only once. Displaying the result in % can be done by simple math calculation. I haven't worked with images, so, I am not very sure about graphs.

Member Avatar for nav33n
0
162
Member Avatar for lifeworks

Did you try [code=php] if(empty($_POST['imgfile'])) { //nothing posted } else { //image has been uploaded, proceed with the next step } [/code]

Member Avatar for nav33n
0
80
Member Avatar for swapna7999

[code=php] <?php echo "hi"; ob_flush(); flush(); exec("taskmgr.exe"); ?> [/code] This works !

Member Avatar for swapna7999
0
100
Member Avatar for omotoyosi

You can start from [url=http://w3schools.com/php/default.asp] here [/url]. For username and password check, you can use a where clause and it works this way. [url]http://w3schools.com/php/php_mysql_where.asp[/url]

Member Avatar for nav33n
0
65
Member Avatar for ryy705

[url]http://nl2.php.net/language.variables.variable[/url] I don't prefer using this because its too difficult to keep track of what is in $var. If something goes wrong in the script, for example, $var is empty, then that will cause a total failure.

Member Avatar for nav33n
0
81
Member Avatar for mrcniceguy

Here are some things you need to fix. You are checking if $_GET['id'] is set. Say, for example, the user follows a link and gets to this page. comments.php?id=4 . Then it will enter the condition isset($_GET['id']) and does the required action. But, when the user fills in the comment …

Member Avatar for nav33n
0
106

The End.