1,741 Posted Topics
Re: As cfroese has mentioned, its the path where you have all your images. You can login through your ftp credentials and check where your images are. Then edit the path in this script. | |
Re: Happy Republic day for Indians and Happy Australia day for Aussies :) | |
Re: [QUOTE=harshbavaliya;1126234]what are you doing at line no. 29...? I think you are giving the value to $row by ($row = mysql_fetch_array($sql)). Well i have not read your program fully, so i can't understand your logic. But you but, use a condition when using while or for loop. by your condition … | |
Re: Welcome to Daniweb! [quote]why the Dollars are having more value than someother currency.[/quote] What about pounds and dinars ? | |
Re: 1. It will not alert your message because you are already returning a value [1 or 0] from the function. Once you return a value, you are out of the function. Either return the value after the alert, or simply, put the alert after the function call. 2. It's not … | |
Re: Since you posted your question [?] in a thread with the same title, I am guessing you need help with the same. I suggest you to read the [url=http://www.daniweb.com/forums/thread191031.html]sticky thread [/url]. :) Btw, You don't have mysql_query in your code. | |
Re: [QUOTE=sachinbhatt;1120688][B]I get this error:[/B] [COLOR="Red"]PHP Parse error: parse error in D:\HostingSpaces\sachinbhatt\sachinbhatt.in\wwwroot\send_mail.php on line 73 [/COLOR] [B]The script is ..:[/B] [CODE]$Subject="New Inquiry"; $Message="Inquiry Details<br>"; $Message.="Name: $FullName<br>"; $Message.="Occupation: $Occupation<br>"; $Message.="Address: $Address<br>"; $Message.="City: $City<br>"; $Message.="State: $State<br>"; $Message.="Phone: $phone<br>"; $Message.="Email: $Email<br>"; $Message.="Comments: $Comments<br>"; $Headers = "From: [email protected]"."\r\n"; $Headers .= "MIME-Version: 1.0"."\r\n"; $Headers .= "Content-type: … | |
Re: What do you mean by ignore spaces ? Do you want to remove spaces ? If yes, use, str_replace function to replace a space with null. You can use strtolower function to convert capital letters to lower case. Lastly, Use header function for redirection. Note: You shouldn't output anything [html … | |
![]() | Re: You should provide the full path for include to work with GET variables. [code] include("http://yourhost.com/folder/file.php?user=someuser"); [/code] |
Re: As Ryan_vietnow has already suggested, uploading a file to the database is not a good idea. Upload it to the filesystem and save the path in the database. Check [url=http://www.tizag.com/phpT/fileupload.php] this [/url] link. Uploading a file is pretty simple. | |
Re: If mysql_num_rows say 4, then something must be wrong with your function, [i]fetch_row[/i]. Post your function and we will try to find out what is missing. | |
Re: simple. Soon after you execute your sql query, use header function to redirect the user to the same page. Eg. [code=php] <?php $conn=mysql_connect("dbhost","dbuser","dbpass"); mysql_select_db("database"); if(isset($_POST['submit'])){ $field1=$_POST['field1']; $field2=$_POST['field2']; $query="insert into rank (field1, field2) values (".$field1.",".$field2.")"; mysql_query($query); header("location: thispage.php"); } ?> <html> <body> <FORM METHOD=POST ACTION="thispage.php"> <INPUT TYPE="text" NAME="field1" ><br /> <INPUT … | |
Re: Here is a simple example. [code=php] <?php if(isset($_POST['submit'])) { if(isset($_POST['option'])) { $option = $_POST['option']; if($option == "yes") { //insert or update or do whatever you want with the posted values header("location: page3.php"); } else { header("location: page4.php"); } } else { echo "You didn't select an option!"; } } ?> … | |
![]() | Re: First form's <option> tag doesn't have values. So, it will never enter the switch cases of the 2nd form. And as CJesusSaves said, It's better to keep php and html separate as it is easy to manage [and you don't have to worry about escaping quotes ['] and ["]]. |
Re: It's not holding because the form is getting submitted. Return false in javascript function "validate". | |
Re: The query is fine. I just created the table on my test database. | |
Re: Nothing wrong with the query and it shouldn't go in an infinite loop. Can you post your script ? | |
Re: [QUOTE=debasisdas;1100865]If you know something and want to show your knowledge then please do not post those here as questions. Better post those as an article ,that will really help the new members.[/QUOTE] In my opinion, It doesn't matter if it is a forum thread or an article to share knowledge. … | |
Re: @Hitman Mania, The problem with your code is, the function array_search will return the key if it finds the needle in the array. Since "a" is the first element of the array, this will return 0 [the key]. 0 which also corresponds to "false" is causing your script to fail. … | |
Re: This above code works fine for me [apart from the insert query]. Few things to remember when dealing with databases. 1. Always sanitize user's input. Never trust your users. This can be achieved using [url=http://php.net/manual/en/function.mysql-real-escape-string.php]mysql_real_escape_string [/url]. 2. If you are sure that the posted value is going to be an … | |
Re: [code] if($_GET['country'] =[COLOR="Red"]=[/COLOR] "Germany") [/code] You are missing another "=" in your statement. | |
Re: [url=http://devphp.sourceforge.net/]Dev-php[/url] Open source, free editor. I haven't used the ftp option in it. But you should give it a try ! :) | |
Re: $row will have an array. You can explode only strings, not arrays. And, as JRM mentioned, I don't recommend the use of mysql_fetch_row. Since this returns an numeric index array, you will have to use $row[0], $row[1] etc. Say, after sometime, you change the database structure, by adding/removing a field … | |
Re: [QUOTE=Scooby08;661351]Hey Thanks a bunch.. I think I got it resolved for now, until I find another problem with it.. I just changed my sql table from this: [code] CREATE TABLE `dw_order_items` ( `order_id` INTEGER unsigned NOT NULL, `item_id` INTEGER unsigned NOT NULL, `item_qty` INTEGER UNSIGNED NOT NULL, PRIMARY KEY (`order_id`, … | |
Re: Not sure what exactly I changed, but this works. [code] <html> <head> <script type="text/javascript"> function resizeText(multiplier,p,what) { if (document.getElementById(p).style.fontSize == "") { document.getElementById(p).style.fontSize = "1.0em"; } if(what == "increase") { document.getElementById(p).style.fontSize = parseFloat(document.getElementById(p).style.fontSize) + (multiplier * 0.2) + "em"; } else { document.getElementById(p).style.fontSize = parseFloat(document.getElementById(p).style.fontSize) - (multiplier * 0.2) + … | |
Re: [QUOTE=Voulnet;1097639]Wow, did you just spam me in my question thread? You didn't even answer the question![/QUOTE] :) Thanks for notifying. Appropriate action has been taken. | |
Re: Hi, You don't have to run the select query thrice. In my opinion, this should work. [code] SELECT media.file_name, users.username, users.creative_specialism FROM media, users WHERE media.user_id = users.user_id ORDER BY date_joined DESC LIMIT 3 [/code] | |
Re: Are you sure it isn't working ? This code with slight modification to yours is working. [code=php] <?php session_start(); $groupname = "test"; echo $groupname; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <script type="text/javascript"> var menu1=new Array() menu1[0]='<a href="employercp.php">Job Portal</a>' menu1[1]='<a … | |
Re: Pass $row['date'] as a parameter to this date function and return the changed value. Eg. [code] function changeDate($date) { $newdate = date('d/n/y',strtotime($date)); return $newdate; } [/code] Call this function wherever applicable. :) | |
Re: [code=javascript] <form method='post' action='test.php' onSubmit='javascript: return validate();'> </form> [/code] This was reported long time ago. [Unfortunately, I can't find it] . Click on [i]Toggle plain text [/i] and see <b></b> right next to [i]javascript[/i]. Browser: Firefox 3.5.5 & IE7. | |
Re: Well, I checked your script and it is fine. I don't see any errors. Apart from saying 'It works', does it say anything else ? Could you be more specific ? | |
Re: [QUOTE=jacobposey;952886]Thank you for posting the examples. I looked at the manual and did not understand it. I like forums where people post their own examples and not just refer to "manuals" because it helps me learn more. Thanks for your help.[/QUOTE] I noticed, its your first post on Daniweb. Welcome … | |
Re: [QUOTE=aminuddin;1060990]I am facing Torjan virus when i used net it come with in one minute anybody can help me in this regard i will be very thankful.[/QUOTE] Post your question in [url=http://www.daniweb.com/forums/forum64.html] this [/url] forum specifying all the details of your computer/operating system etc. @Mad hatter, Get over with your … | |
Re: You can set a cron to run on every first day of the month, which will copy the record from main table to archive table[and delete entries in the main table]. We do it the same way in our company, but the data is archived on yearly basis. I also … | |
| |
Re: You *cannot* decrypt it. If you store sha1 of a string, while authenticating, convert the string to sha1 and compare it with the value in the table. | |
Re: [quote] $query = mysql_query("SELECT * FROM Employee WHERE $method = '$search'"); $result = mysql_query($query); [/quote] This is wrong. Try, [code] $query = "SELECT * FROM Employee WHERE $method = '$search'"; $result = mysql_query($query); [/code] | |
Re: [QUOTE=rolexreplica;1049999]Wow what a nice funny video. I really like this video. I have saved this link in my book marks. Thanks a lot for sharing such a nice and funny video.[/QUOTE] Are you a bot ? Or do you/your team copy paste the same thing in all the threads you … | |
Re: You can do it in 2 simple ways (maybe there are even more, but I am not aware of it). You can either save the data of the first form in session after it is posted, and then, when the second form is posted, get all the data (session data … | |
Re: Initialize the array outside the while loop. The array is getting over-written everytime it enters the loop. So you are getting only the last record. Secondly, notices can be ignored. If you use variables without initializing them, you will get a notice. It is a good programming practice to initialize … | |
Re: Very simple. [code] ALTER TABLE tablename ADD columnname datatype AFTER columnname [/code] | |
Re: [QUOTE=cwarn23;1052419]I agree because I used to solve questions like crazy in the php forum but now there are fewer questions that are not already solved by another member. [/QUOTE] Hmm.. Maybe recession is a factor too. :) | |
Re: [QUOTE=niek_e;1053669]I clicked the link you provided, went to the second post and saw all the "printf" in bold. When I click "toggle plain text", no HTML code whatsoever is shows. No <strong> or <bold> . I'm using ff3 on Windows vista 64[/QUOTE] It did for me. [quote] <strong class="highlight">String</strong> format … | |
Re: The echo statement is incorrect. [code] echo "<a href=\"inventorid.php?inventorid=".$data2['inventorid']."\">".$data2['inventorid']." ".$data2['firstname']." ".$data2['lastname']."</a>\n"; [/code] is the correct syntax. Also, to make life simple, you can use, [code] $inventorid = $data2['inventorid']; $firstname = $data2['firstname']; $lastname = $data2['lastname']; echo "<a href='inventorid.php?inventorid=$inventorid'>$inventorid $firstname $lastname</a>\n"; [/code] Cheers! |
The End.