1,741 Posted Topics
Re: Which server side language are you using ? If you are using php, you can create a string like 10|11|12 and insert. While fetching these values from the table, use explode to split the values into different variables. :) | |
Re: You are not selecting any database :) [icode] mysql_select_db("Databasename"); [/icode] | |
Re: <offtopic> You should also consider using [url=http://in.php.net/mysql_real_escape_string] mysql_real_escape_string [/url] to prevent any kinda sql injections. </offtopic> :) | |
Re: Check if you have specified the correct username, password, database name and host address in dbconnect.php . (Maybe it still has local settings). | |
Re: Wow! That was a thrilling match. But honestly, 50 grand is a huge price amount for just standing and making gestures ! :-/ | |
Re: Yep. Happened to me too at this thread. [url]http://www.daniweb.com/forums/thread189490.html[/url] For some reason, it fails to parse the [code] tags :S. Edit: It worked ( I didn't even try to change anything :S ) | |
Re: I hope this example will give you a better idea. [code=php] <html> <body> <form method="post" name="form1"> <select name="location"> <option value="city1" <?php if($_REQUEST['location']=="city1") { echo "selected"; }?>>City1</option> <option value="city2" <?php if($_REQUEST['location']=="city2") { echo "selected"; }?>>City2</option> <option value="city3" <?php if($_REQUEST['location']=="city3") { echo "selected"; }?>>City3</option> <option value="city4" <?php if($_REQUEST['location']=="city4") { echo "selected"; }?>>City4</option> … | |
Re: First of all, those are notices and not errors. Notices are those which you can totally ignore. If you don't initialize the variables and use it, you will get a 'notice'. If you want to be a good programmer, initialize every variable you use to its respective default value. "" … | |
Re: [quote]<form name="Dates" action=".php" method="post" onsubmit="return checkCheckBoxe();"> [/quote] action=".php" should be action="filename.php". | |
Re: Wtf is wrong with you man ?? :-O Why don't you find someone at your office, get married, take a break and then come back ? This isn't love. Its just infatuation and you are too old for that. | |
Re: What error do you get ? And what do you have this for ? [code=php] if($ufile !=none) { ...... } [/code] This works for me :) [code=php] <?php //set where you want to store files //in this example we keep file in folder upload //$HTTP_POST_FILES['ufile']['name']; = upload file name //for … | |
Re: [quote] so what I telling is Narue++ .and C++ is for the human beings , and it's the #1 fav programming language that I'm studying . [/quote] :D umm.. What are you talking about ? | |
Re: [QUOTE=serkan sendur;827126]>they must have cleaned out all the old ones or started a new forum recently because I know it was fairly popular when I was using it 20 years ago. you are really ancient :)[/QUOTE] It seems like you are begging for trouble :) | |
Re: What do you mean by [quote] then move $textbox_value to top of the list.[/quote] ? Top of which list ? | |
Re: Rashakil Fol was banned because he flagged a blog post by happygeek ? :-/ (That's what Rashakil Fol said in one of his posts which was later deleted!!!) Umm..He used 'crude words' in his post. Maybe that is the reason it was deleted. P.S. Maybe his fierce battle with Serkan … | |
Re: - deleted - I think you are right ! Just when I thought it had nothing to do with the member count (which is 4663 right now), it started behaving strangely. Daniweb has become slow as a tortoise. | |
Re: 1. I would never use form element's names like, Y M D, ie., with spaces. Try, [code=php] <input id="dmy" name="dmy" type="text" /> [/code] And in the php script, [code=php] $date = mysql_real_escape_string($_POST['dmy']); [/code] mysql_real_escape_string escapes all the [i]escape characters[/i] and prevent sql injections. Also, Instead of executing the query directly, … | |
Re: [quote] Guess ! yes guys that's my girlfriend == my new dynabook 2010 DS86p/2 computer . I love it soooo much. now I can read ebooks at the interval time @ my city and guilds electronic engineering class. Now I don't need friends . This is my friend. [/quote] :-O … | |
Re: [QUOTE=serkan sendur;855353]i have PM enabled, i want to be able to see those referrals by clicking some links in my profile, better to referrals text it self.[/QUOTE] You can. Go to your [url=http://www.daniweb.com/certificates/] Member Certificate [/url]. You will see [quote] Members You've Referred When users find DaniWeb through your member … | |
Re: Use [url=http://www.wampserver.com/en/download.php] Wamp [/url]. Easy to configure and use! :) | |
Re: Instead of having different names for your checkboxes, use a checkbox array and on submit, loop through all the selected checkbox and insert a record to the table. For eg., [code=php] <form name="addcode" action="<?php $_SERVER['PHP_SELF'];?>" method="POST"> <br /> <input name="code" type="text" value="Enter Code"> <br /> 1:<input type="checkbox" name="checkbox" value="table1"> 2:<input … | |
Re: What does $row['image'] print ? If you are in the subdirectory and if you want to print an image in the main directory, use [b]..[/b] . ie., [icode] ../imagename.jpg [/icode] | |
Re: Use [code = php] [/code] Without a space on either side of [b] = [/b]. ;) | |
Re: I checked your script. [quote] <input type="hidden" value="$autoid"> [/quote] is wrong. If you want to have a hidden element with php variable's value, you should do, [code=php] <input type="hidden" name="autoid" value="<?php echo $autoid; ?>"> [/code] Secondly, Everytime there is a database operation, you have mysql_connect and mysql_select_db in your script. … | |
Re: Build the values first and add it in the message part of the mail.. Something like this, [code=php] <?php foreach($product as $value) { $message .= $value ." is in the cart.<br />"; } mail("someuser@gmail.com","Welcome",$message,"From: someone@gmail.com"); ?> [/code] | |
Re: You can use modal dialog box to do the job. Check the first example in this link for demo. [url]http://www.dhtmlgoodies.com/scripts/modal-message/demo-modal-message.html[/url] You can download it here. [url]http://www.dhtmlgoodies.com/index.html?whichScript=modal-message[/url] | |
Re: I made a dummy xml using my tables. [code=php] <?php header("Content-Type: text/xml"); $output = '<rss version="2.0"><channel>'; $dbhost = 'localhost'; $dbuser = 'root'; $dbpass = ''; $connect = mysql_connect($dbhost, $dbuser, $dbpass); if (!$connect) { die('Could not connect: ' . mysql_error()); } $dbname = 'test'; mysql_select_db($dbname); //set the content type to xml … | |
Re: [QUOTE=Trav580;850838]I decided to do a google search for linear intersections in python programming, after posting [URL="http://www.daniweb.com/forums/post850612.html#poststop"]here[/URL]: and came across [URL="http://www.trade-travel.com/web-development/8963-beyond-confused.html"]this[/URL]. I found it odd, cause I have never seen that page until just a bit ago and noticed that the post is identical to mine down to a type in … | |
Re: Your code seems okay. Is TBL_SITE_NEWS a constant ? Meaning, is it defined somewhere ? Does the values provided in the query match the column count of the table ? | |
Re: I have a suggestion for you. Never post your username and password in a forum. :) You can still edit your post and replace username and password with null or * or whatever. And also, fix your [noparse] [code] tags [/noparse]. | |
Re: All the directories will be in data folder under mysql directory. If you have installed WAMP, for example, the databases will be in c:\wamp\mysql\data :) Look for data directory. | |
Re: [quote] But is that true , when we cut a mango from a tree , well take the mango . [/quote] Noooo! mango is just like an egg. Just like how you can incubate an egg to turn it into a cute kiddo chicken, a mango can grow into a … | |
Re: Well, read the line in [color=red] red [/color] very carefully. Don't you see a missing ) after false ? Don't forget to change it everywhere. Edit: 1. Don't create duplicate threads as it will not help you in any way. 2. Please use [noparse] [code=php][/code] [/noparse]tags to wrap your code. … | |
Re: $query = "select * from table where id = 100"; $result = mysql_query($query); if(mysql_num_rows($result) > 0 ) { // record already exists } else { // record doesn't exist, so insert.. } | |
Re: I don't know if this is what you meant. [code=php] <?php $arr = array("apple","mango","grapes"); $var = "apple 1"; foreach($arr as $value) { if(strpos($var,$value) !== false) { echo $value ." is the closest match for ".$var."<br />"; } } ?> [/code] | |
Re: What is with(form) ? Are you calling a function called [i]with[/i] which is declared somewhere else ? Also, [i] agreement.value.checked [/i] wouldn't work because, [list][*] The syntax is not correct [*] It will say agreement is not defined! [/list] Try this. [code=javascript] function validate(form) { if(!(form.agreement.checked)) { alert("Please commit the … | |
Re: [QUOTE=jda318;847589]This is the code for the form input: [code] <select name="grades" size="5" multiple id="grades"> <option value="Pre K">Pre K</option> <option value="Kindergarten">Kindergarten</option> <option value="1st">1st</option> <option value="2nd">2nd</option> <option value="3th">3rd</option> <option value="4th">4th</option> <option value="5th">5th</option> <option value="6th">6th</option> <option value="7th">7th</option> <option value="8th">8th</option> <option value="9th">9th</option> <option value="10th">10th</option> <option value="11th">11th</option> <option value="12th">12th</option> </select> [/code] Since there is an … | |
Hi all ! I have been assigned a task to implement an insert query into table a [i] only if [/i] a record doesn't exist in table c. I have been scratching my head for past 2 days and even my best friend [i] google [/i] didn't help me much, … | |
Re: I started with editplus, then notepad++.. Zend studio is the best AFAIK.. I have also used phpeclipse, netbeans and aptana. Even though they are good, I don't like them. They HOG a lot of system resources! Nowadays, I use devphp (not [i]extremely [/i]good, but its not that bad. It still … | |
Re: [quote] How do I ensure that the submit will go only toward the person who is logged-in's id in the database? [/quote] Pass logged person's id as a hidden form element. Use that id to update the table. :) | |
Re: [QUOTE=GrimJack;841962] I remember years ago there was a guy downtown carrying a sign that read "The air is moving, it could be alive". [/QUOTE] You aren't serious! Are you ? :D | |
Re: <offtopic> [QUOTE=GrimJack;839598] Sorry - I guess I am getting grumpy again.[/QUOTE] GrimJack, Whenever you mention the word grumpy, it reminds me of [url=http://www.youtube.com/watch?v=1kXOg23pGeA]Walter [/url] character used by ventriloquist Jeff Dunham ;) </offtopic> | |
Re: [url=http://www.youtube.com/watch?v=R795KiMD4zs]Evolution [/url] according to Fat boy slim ;) | |
Re: I am an oracle certified associate (OCA). But the certification didn't help me one bit when I was looking for a job! Even though I had the certification, most companies asked for experience! Bah! I am not sure about Java certification though. :) | |
Re: [QUOTE=paulthom12345;836666]Just wondering what people thought about the update to how the profile gets viewed. Personally i kind of like it but then there is no posts/day thing. Im not sure whether thats a good thing or not personally. To the site admins and such, is there any reason for this … | |
Re: [quote] echo $_SESSION['uid']; [/quote] You are echoing userid. Are you sure you thoroughly checked it ? :icon_rolleyes: | |
Re: <form> tag should be above <select> tag. <select> tag can't have value attribute. And always use [code=php] echo "<option value='".$nt['test_id']."'>".$nt['test_name']."</option>"; [/code] instead of [code=php] echo "<option value=$nt[test_id]>$nt[test_name]</option>"; [/code] (Thats the clean way of writing it). P.S. Don't use @ before your queries. It will supress the errors and you wont … | |
[url]http://www.daniweb.com/forums/thread183812.html[/url] This thread has 2 pages. But for some reason, I can't go to page2. It redirects me back to page1 ! When I changed the display mode to Hybrid, I noticed that the post by rahul8590 is the last post (and its on page1) ! I am wondering why … |
The End.