1,741 Posted Topics

Member Avatar for forzadraco

[code=php] <?php // removal malicious script by forzadraco $filename="target.php"; $existfile=fopen($filename,"a+"); if($existfile){ echo "file berhasil dibaca \n\n"; }else{ echo "file gagal dibaca \n\n"; } if( false == ($str=file_get_contents( $filename ))) echo "Could not read file."; else echo "File contents: ".htmlspecialchars($str); $hsl=preg_replace("/xxxx/i","draco",$str); echo "<hr />".htmlspecialchars($hsl); fwrite($existfile,$hsl); fclose($existfile); ?> [/code] Check "mode" [url]http://in2.php.net/manual/en/function.fopen.php[/url] …

Member Avatar for cwarn23
0
168
Member Avatar for serdas

Use nl2br function :) ex. [code=php] $message_with_breaks = nl2br($_POST['message']); [/code]

Member Avatar for mschroeder
0
194
Member Avatar for nawabsheriff

You can do this in 2 ways. One, to store whatever the user enters in text box in a table and then get the records from the table and use it in drop down list. The second method, which is a temporary method, is to have a session array variable, …

Member Avatar for cwarn23
0
79
Member Avatar for kclove

It would really help if you tell us what errors are you getting and also, by using code-tags to wrap your code.

Member Avatar for sarithak
0
165
Member Avatar for jakx12

Column names which are mysql keywords have to be wrapped in [b]`[/b] or else, it would give the above error. date, status, from etc are all keywords.

Member Avatar for mschroeder
0
162
Member Avatar for sarithak

I would rather do something like this. [code=php] select * from table where column REGEXP "am.*.a" [/code] The regular expression will search the column for any value which starts with [b]am[/b] and ends with [b]a[/b]. I can't think of any other alternative solution!

Member Avatar for nav33n
0
99
Member Avatar for serdas

[QUOTE=serdas;796282]i get this error when i try to add the field [code]Error SQL query: ALTER TABLE `default_en_comments` ADD `comment_id` INT NOT NULL AUTO_INCREMENT FIRST MySQL said: #1075 - Incorrect table definition; there can be only one auto column and it must be defined as a key [/code][/QUOTE] You should make …

Member Avatar for serdas
0
261
Member Avatar for EnetJohn

[QUOTE=EnetJohn;796506]hi......... help me plss to write coding to open a new pop up window while clicking on specific points on a map... regards enet[/QUOTE] This is called imagemapping. Check this out! [url]http://www.milonic.com/menusample4.php[/url]

Member Avatar for death_oclock
0
122
Member Avatar for HanKar

[code=mysql] Select * from suppliers group by supplier_TIN order by supplier_num desc; [/code] This will list all the records with least supplier_num ..

Member Avatar for nav33n
0
57
Member Avatar for MSK 7

[url=http://www.google.com/search?q=validate+a+form&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a]Google [/url] is your best friend.

Member Avatar for nav33n
0
66
Member Avatar for queenc

[code=php] <?php session_start(); $_SESSION['user']="test"; echo "<script type='text/javascript'>alert('".$_SESSION['user']."');</script>"; ?> [/code] Like this ?

Member Avatar for mschroeder
0
83
Member Avatar for jakx12

If you 'investigate' properly in phpmyadmin, there is an option exactly below the table's structure to add a new column. You can specify the columnname, its datatype and mention "auto_increment" under extra. :-) Its quite simple. [code=mysql] ALTER TABLE tablename ADD columnname INT NOT NULL AUTO_INCREMENT [/code] is the query …

Member Avatar for nav33n
0
78
Member Avatar for desiguru

If you want to 'move' a column from one table to another table, both the tables should have a common column to link these 2 tables. First, as Vermadba has mentioned, you have to create a column called "id" in table_2 first. Then, update the second table's "id" column using …

Member Avatar for nav33n
0
264
Member Avatar for dami06

[code=php] // Check if session is not registered , redirect back to main page. // Put this code in first line of web page. <? session_start(); if(!session_is_registered(myusername)){ header("location:main_login.php"); } ?> <html> <body> Login Successful </body> </html> [/code] Do you have the comments outside the <? tag ?

Member Avatar for MVied
0
361
Member Avatar for techie
Member Avatar for sagedavis

[quote]I do not know why it is, with all of the sites that talk about replacing a space with an underscore, none of them gave this, ever so simple answer. [/quote] What did you search for :P [quote]Maybe it just doesn't look as cool as all of that regular expression …

Member Avatar for bugmenot
0
806
Member Avatar for tedobg

Try this.. [code=php] <?php if(isset($_POST['submit'])){ if(!empty($_POST["name"]) && !empty($_POST["pass"]) && !empty($_POST["email"])) { $name=$_POST["name"]; $pass=$_POST["pass"]; $email=$_POST["email"]; $con=mysql_connect('localhost','root','password'); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("users"); $sql = "INSERT INTO members (username,password,email) VALUES ('$name','$pass','$email')"; $query = mysql_query($sql) or die('Error: ' . mysql_error()); echo "Inserted successfully !"; } else { echo …

Member Avatar for ashafaaiz
0
251
Member Avatar for pizzafiend
Member Avatar for kaushik259106

Umm.. Change “ ” to " ". Put data.txt in the same folder where you have the ajax script. I don't know much of ajax, but, the following code worked for me without any errors. [code] <html> <head> <title>Ajax at work</title> <script language = "javascript"> var XMLHttpRequestObject = false; if …

Member Avatar for egbert
0
206
Member Avatar for Shanti C

Yep. See here, Kkeith29 has done something like that. [url]http://www.daniweb.com/forums/thread126462.html[/url]

Member Avatar for shivjamesh
0
519
Member Avatar for grvs

[quote]I guess, if its not very difficult to allow editing some posts forever, while keeping the 30 mins rule with all other posts, it should be done. [/quote] I think, that needs a lot of work and also not a good idea !

Member Avatar for punjabivirsa3
0
171
Member Avatar for rathor0407

[url]http://www.webreference.com/js/tutorial1/opener.html[/url] Exactly what you are looking for! (Check the opener property example)

Member Avatar for coolest102
-1
119
Member Avatar for maydhyam
Member Avatar for maydhyam
0
99
Member Avatar for The Judge
Member Avatar for LabASSistant
0
51
Member Avatar for farahphp
Member Avatar for kings

You are getting the listbox and the values but you can see it, because you don't have the value between <option></option>. Ie., [code=php] echo '<option value='.$myrow['$industrytype'].'>'.$myrow['$industrytype'].'</option>'; [/code]

Member Avatar for cVz
0
146
Member Avatar for ~s.o.s~

[QUOTE=TheNNS;653392]it's bullcrap. if you're gonna post something funny, make sure IT IS funny.[/QUOTE] [quote]lol.[/quote] [quote]i laughed so hard it took me five minutes to get through it!! Seriously funny to me[/quote] [quote] It's a very funny memo... [/quote] I think people found it funny :)

Member Avatar for sneekula
3
427
Member Avatar for innovativeatul

[QUOTE=innovativeatul;482904]Many thnx for guiding. Now can u pls. tell me what field should i choose to get good amount of salary and also long time Option i have : Asp.Net or Php thnx,[/QUOTE] If we discuss salary here, I would definitely say that an asp.net programmer gets a LOT MORE …

Member Avatar for R0bb0b
0
148
Member Avatar for choudhuryshouvi

[quote]its pleasure to tell you guys that i've solved this problem. now i'm getting the table names from my sql database. [/quote] It would have been much more better if you had mentioned how you solved your problem. :)

Member Avatar for dhanya_piit
0
190
Member Avatar for osman85

[QUOTE=osman85;660534]i changed the body accordingly. i am trying to get to info sent to my email and then have the page redirected to my paypal page. i get this message "Parse error: syntax error, unexpected '<' in /home/mysigninname/public_html/orderformprocess4.php on line 48" [code]<?php /* Subject and Email Variables */ $emailSubject = …

Member Avatar for osman85
0
130
Member Avatar for Dani

[QUOTE=MidiMagic;590456]Here are mine: Watermarks in the reply box. Put that message OUTSIDE the box. It is maddening to the mildly dyslexic, because it makes the text impossible to read once it is typed. The reply box clearing when I navigate away to get something to paste in there. The insertion …

Member Avatar for William Hemsworth
0
997
Member Avatar for Shanti C

Using [icode] set_time_limit(0) [/icode] in your script will make the maximum execution time to 'infinity'. This usually happens if you are processing large number of data or if one of the loop in your script has failed..

Member Avatar for Demiloy
0
129
Member Avatar for ramseswar

There are so many extra }. You need to post your complete code because this code doesnt make much sense.

Member Avatar for ramseswar
0
109
Member Avatar for ufucuk

[code=php] <?php $reg = '/<td>(.*)<\/td>/s'; $sub = '<td><a class="page" title="myPage" href="/mypage/888"><img class="hotel" src="mypage.png" /></a></td>'; preg_match($reg,$sub,$matches); print htmlentities($matches[1]); ?> [/code] Cheers!

Member Avatar for langsor
0
115
Member Avatar for ishlux
Member Avatar for nav33n
0
81
Member Avatar for god_1896
Member Avatar for justted

I didn't go through your code. But this is wrong. [quote] if ($membersprofiles[username]= $username) { $bank_balance = $bank[bank_balance]; } [/quote] You are comparing. so, you need ==. [code=php] if ($membersprofiles[username] == $username) { $bank_balance = $bank[bank_balance]; } [/code]

Member Avatar for R0bb0b
0
179
Member Avatar for mindfrost82

Here is an example. [code=php] <?php $handle = fopen('somefile.csv', 'r'); if ($handle) { //the top line is the field names $fields = fgetcsv($handle, 4096, ','); //loop through one row at a time while (($data = fgetcsv($handle, 1000, ',')) !== FALSE) { $name=$data[0]; $address=$data[1]; print "somesite.com?id=".$name.$address; } fclose($handle); } ?> [/code] …

Member Avatar for mindfrost82
0
2K
Member Avatar for AliHurworth

[quote] $sql = "INSERT INTO `wkho_users`.`directory` (id, organisation, type, addr1, addr2, addr3, addr4, addr5, pcode, phone, fax, gen_email, other, person, position, ext, pers_email) VALUES ('','$org','$type', '$addr1','$addr2','$addr3','$addr4','$addr5','$pcode','$telno','$fax','$web','$notes', '$name','$title','$ext','$email'"; [/quote] Missing ) in the end.

Member Avatar for nav33n
0
94
Member Avatar for Q8iEnG

Since you are trying to use .png files, [icode] $im_src = imagecreatefromjpeg($source); [/icode] will not work. Because, imagecreatefromjpeg will work for jpeg files ! If you want to work with .png files , you should use [url=http://in2.php.net/manual/en/function.imagecreatefrompng.php] imagecreatefrompng [/url].

Member Avatar for nav33n
0
154
Member Avatar for lydia21

:-/ This script is working fine for me! I get mails with html tags.

Member Avatar for buddylee17
0
143
Member Avatar for theimben

The names of your input are wrong. That is, [quote] <label> Movie Name: <input name=\"$moviename\" type=\"text\" value=\"$moviename\" size=\"31\" maxlength=\"30\" /> </label> [/quote] [icode] name=\"moviename\" [/icode] and not [icode] name=\"$moviename\" [/icode] Since the variables will be empty, the input tags name will be empty too.

Member Avatar for theimben
0
187
Member Avatar for knarffrank
Member Avatar for nzaman
Member Avatar for Shanti C
0
67
Member Avatar for charbel007

First of all, why do you have different name for checkboxes ? You can create a checkbox array by giving the same name for the checkboxes. Then, on page submit, only those checkboxes which were selected will be posted to the next page. I don't know what exactly your script …

Member Avatar for charbel007
0
800
Member Avatar for veledrom

[QUOTE=saikishore;659889][code] <?php // we must never forget to start the session session_start(); $dbhost = 'localhost'; $dbuser = 'root'; $dbpass = ''; $dbname = 'urdbname'; $errorMessage = ''; if (isset($_POST['txtUserId']) && isset($_POST['txtPassword'])) { $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die('Error connecting to mysql'); mysql_select_db($dbname); $userId = $_POST['txtUserId']; $password = $_POST['txtPassword']; // …

Member Avatar for veledrom
0
117
Member Avatar for asyieen

What's the error ? Check if the path you have specified in copy is reachable. Also, there are some mistakes. Its always better to use $_FILES['img1']['tmp_name'] instead of $_FILES[img1][tmp_name]. Don't give a space between $_FILES['img1'] and ['tmp_name'].

Member Avatar for nav33n
0
77
Member Avatar for Scottmandoo

Because you are using mysql_fetch_row and trying to use the associated name. Use mysql_fetch_array instead.

Member Avatar for Scottmandoo
0
284
Member Avatar for Papa Awortwe

[QUOTE=Shanti Chepuru;658392]in first page: [code] <?php session_start(); $my="blue"; session_unregister("my"); session_register("my"); $_SESSION['my']=$my; echo "<a href='show_session_var.php'>Click here to go to next page</a>"; ?> [/code] in second page: [code] <?php session_start(); echo $_SESSION['my']; ?> [/code][/QUOTE] You don't have to register a session variable if you are using it. I mean, [icode] session_register("my") [/icode] …

Member Avatar for Shanti C
0
92
Member Avatar for jstonewell

The End.