- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
35 Posted Topics
Re: [QUOTE=jtreyes;514780]How do I assign a database query value in such a way that the value becomes the selected value in a drop down box.[/QUOTE] I do not entirley understand the question, do you mean that you want to have some set variables, then one of them from a database, or … | |
Re: you say you have problems sending it to multiple addresses, but its fine for one. Maybe theres a format error, like you didnt put a , after each email or wrap the emails in "": To: "user@address.com", "other@address.com" Only a simple idea, but its all i could come up with. … | |
I am trying to make a form, with a textbox next to a select box. When the user selects an option in the select I would like the textbox to display some text to explain what each select option means. I have this so far: (I have left out anything … | |
Re: Hopefully this will give you an idea that you can adapt into your code, if not then ask again [code=php] <?php if(isset($_POST['box01'])) { $box01 = 1; } else { $box01=0; } if(isset($_POST['box02'])) { $box02=1; } else { $box02=0; } $insert=mysql_query(" INSERT INTO tablename('field01', 'field02') VALUES ('" . $box01 . "', … | |
I have been trying to use the function is_null to see if a database value is NULL. When I run this I am looking at the database and the value is definitely NULL, but it is not re-directing to the error.php page. What have I done wrong?? Thanks Guys :-) … | |
Re: This is a very simple example, but you can build on it: I am sure you know how get works, but ill put it here anyway, this link sets $_GET['article'] to 1001 on my localhost: [url]http://localhost/testing/test07.php?article=1001[/url] [code=php] mysql_select_db("testbase") or die(mysql_error()); $query=mysql_query(" SELECT info FROM articles WHERE article_id='" . $_GET['article'] . … | |
Hi guys, I am trying to make a javascript function that will add "000" to the end of a textbox value if the user presses k and also add "000000" if they press m. So i don't want the k or m to appear in the textbox and some 0's … | |
Re: I dont know too much about access, but Im sure you can input sql commands somewhere, heres the sql i would use SELECT employee_ID FROM available_numbers LIMIT 0, 1 the LIMIT 0, 1 just picks out the first entry for you If you dont understand sql then i can look … | |
Re: just so you know if you use javascript for this people can still paste things into the textbox, unless you disable ctrl+v and right clicking on the text box ;) | |
Re: dude, you have comment tags around the whole thing <!-- ...... --> I don't know if that might change anything by taking those out, but try it and see | |
Re: I would guess you're using PHP since you're in the MySQL forum, so I would suggest simply making a new table in your database with all the things people have searched for (from the look of your page it looks like you already have that table) and use this code … | |
Re: I can help with the splitting the code after each comma, I had a similar problem to this recently and came up with this solution (I couldnt put it in code tags because then it wouldnt highlight the bits that need changing): //you will need code up here to get … | |
Hi, i have a form on my website, and I would like to have a text box next to another text box that displays how many letters the user can type into the box eg: [code=html] <td><input type="text" name="description" maxlength="30" /></td> <td><input type="text" class="counter" value="30" disabled="true" /></td> [/code] This is … | |
I am a Javascript newb, and I am haveing some trouble with my arguments. [code=javascript] function openMenu(tableName) { document.getElementById(tableName).style.visibility="visible"; } [/code] This is the code i have, and it is working perfectly on the different menus at the top of my screen. The problem i have is with my table … | |
I have a search box on my website, that allows users to look for items that have been posted by other users, I am using this code a the moment, but there is a problem with it [code=php] $category=$_GET['cat']; $text=$_GET['text']; $query=mysql_query(" SELECT * FROM event_information WHERE category='" . $category . … ![]() | |
Re: I dont know if it is as simple as this, but you have left out a " at the end of your $sql = part before the ; | |
Ok im not sure wether this counts as a php question or a database question, but ill put it here anyway. I have two fields in a database, one of which holds a foreign key that is a primary key from the other: USER(user_ID, username, password) USER_INFORMATION(user_info_ID, [COLOR="Red"]user_ID[/COLOR], name, DOB, … | |
Re: [QUOTE=njagi;516051]It may be a good idea ti have a unique id to accompany the firstname lastname pair and submit the id instead of the name itself. for example <?php $result=mysql_query($query); $option=""; while($data=mysql_fetch_array($result)){ $option.="<option value=".$row['ID'].">".$row['lastname']."".$row['firstname']."</option>"; } ?> this should give id name pair like this. 1 doe john 2 kamau kuria … | |
Re: Ok here is how i would design the database for this, it is in the format TABLENAME(primary_key**, foreign_key *, other field, other field)//notes (each table has start_date and end_date at the end but i didnt put them in) USERS(user_ID**) // just so that all the people are connected STUDENTS(student_ID**, user_ID … | |
Hi I have some code here that fills a dropdown box from an array depending on what is selected in another dropdown box. One of them is disabled, and i would like to stop that once an option has been selected. This is the Javascript: [code=javascript] function fillStates(opt){ s=document.f.states.options s.length=stateNames[opt].length … | |
Re: woo that was me :P Maybe there is a way to stop the user from pressing the control key (maybe display an alert box when they press control in the box) obviousley the same applies to right-click and paste, and edit then paste (from the toolbar) i dont know how … | |
Re: Well I would suggest that you put the first name and last name into separate fields. I think it is because it doesnt post spaces or anything after them. Perhaps you could have an underscore if you want to keep them all in one field. I have tried get, that … | |
Hi guys, i am writing this piece of code, it is building some javascript. I have got it working exactly the way I would like, apart from in the while loop, I would like to reomve the comma on the last loop. This needs to be removed for the javascript … | |
Re: you would be better off making 2 links to external css files on the index page: [code]<link href="mainstyle.css" rel="stylesheet" type="text/css" /> <link href="substyle.css" rel="stylesheet" type="text/css" /> [/code] And only have a link to the mainstyle on the other pages. This way your site will load quicker, as it wont have … | |
Re: I have tested for IE7 and couldnt get any change in the text at all inside the dropdown menu | |
Re: there is nothing wrong with your code so far as i can see, I have just copied it onto my computer and it works perfectly well. maybe you have a server problem | |
Re: sometimes the location:header part has a problem, since it is supposed to be set before any html. the way around this is to put <?php ob_start(); ?> at the very top of the page, before the <html> tag and <?php ob_flush(); ?> after the last line </html>. There is an … | |
Re: I dont mean to say that your method doesnt work, but if you use this javascript function, the user can still copy and paste letters into the box. I havent tested MitkOK's code, but i think that would work better, since it would eliminate the chance of copy + paste. | |
Re: I would reccomend using [URL="http://www.w3schools.com"]www.w3schools.com[/URL] for any web-based learning. There are a variety of ways you post the cookies to the users machine, but i reccomend php as being quick and easy to learn. As for using frontpage, I don't know, but I thoroughly reccomend dreamweaver for writing any web … | |
Hi everybody, I am new to using XAMPP to locally test my php files (I previousley just uploaded them directly to a free hosting site). I was wondering if anybody knew how other people can view these files. I think it has something to do with replacing the localhost bit … | |
Re: I use dreamweaver for all coding: html, css, javascript, php, sql and i use XAMPP for local testing. i have found it to be very easy to use, with the exception that i have to have 2 command windows open in the background all the time. it does have phpmyadmin … ![]() | |
OK, so i have written a website that has been hosted online with a free hosting company for some time, but now i have limited access to the internet, so i have started using XAMPP. The code that once was fine on the hosting site has now stopped working. I … | |
Re: I am not too clear on what you are asking for, so I shall give you a solution to what i think it is, if i am wrong, post back with further queries. First of all what tables you need depend entirley on what information your company is interested in … | |
Re: [QUOTE=shapeshifterx;508141]I am currently designing the product/product variation tables for my e-commerce site. my tables so far are as follows (ive taken columns that arent related to the problem out). PRODUCT(prod_id*, name, desc, price) //product details VARIATION(var_id*, name) //colour, weight, strength etc VARIATIONS(vars_id*, name) //blue, green, 100g, 200g, 5x etc. PRODUCT_VARIATION(prod_var_id*, … | |
Re: [QUOTE=mnewsome;506809]Greetings: I am looking for a free collaboration site so that two individuals can see the same file simultaneously. Ideally, each could take turns editing an excel spreadsheet by mouse. Advice sought[/QUOTE] I really like google docs for this feature, it allows you to upload your excel, word and other … |
The End.