1,038 Posted Topics
Re: You have to surround it with quotes, it's a string. [code=php] $wiseword = '<div class="left-box"><p>'.$quote[$rn]['quote'].'</p><p align="right">'.$quote[$rn]['auth'].'</p></div>';[/code] | |
Re: Well considering you haven't shown us any of the code or a link to the page it's a bit like diagnosing a patient that hasn't told you any symptoms. | |
Re: You're better off writing a short method to remove the box in question like this [code=javascript]function remove(elemID) { elem=document.getElementById(elemID); elem.parentNode.removeNode(elem); }[/code] You don't have to leave the page since all browsers since about 1998 (>IE5.5) have been able to use DOM manipulation Then:[code=html]<a onclick="remove('someID');">Remove</a>[/code] | |
Re: Well you don't really need to use PHP for that, that is some very simple JavaScript [code=javascript] function addBoxes(numBoxes, parent) { for(i=0;i<numBoxes;i++) { $tmpbox = document.createElement('input'); $tmpbox.type = "text"; $tmpbox.id = "txt"+i; parent.appendChild($tmpBox); } } [/code] Then in the page just put [code=html] <form> no of textboxes needed to generate … | |
Re: Well you can use your IP address but you'll have to open up port 80 on your firewall and router if applicable. You can also use something like no-ip.org to get a free, albeit temporary, domain. | |
Re: Take out the semicolons after the Values ie., [code=php] $sql="INSERT INTO $tbl_name(VeteranName, Address, StateProv, ZipCode, Branch, Dateserved, Comments, guestname, Phonenumber, city) VALUES('$VeteranName', '$Address', '$StateProv', '$ZipCode', '$Branch', '$Dateserved', '$Comments', '$guestname', '$Phonenumber', $city')"; $result=mysql_query($sql); [/code] Also, don't do [inlinecode]$VeteranName = $_GET['VeteranName'];[/inlinecode] etc. just do [inlinecode]extract($_REQUEST);[/inlinecode] | |
Re: It's not a script, it's just an iframe. For future reference try to spell out your words, that was incredibly confusing. | |
Re: If you're on linux then grep is your friend. Also as Johnsquibb said, if you have probably over 5 instances of identical code, put it in one file then just include it. | |
So, I've got a nifty little recursive function that runs through a select box and all it's children looking for the selected element and removes it, if the parent element is empty then it removes that as well. However, the W3C decided when passing DOM that there are 12, count … | |
Re: I think he wants to import a javascript variable into PHP. the easiest way would be to write the variable to a hidden form element then retrieve it in REQUEST data. | |
Re: ... I'm not entirely sure why'd you write your own function when the built-in addslashes function works perfectly well. | |
Re: Ezzaral gave quite a nice example. [inlinecode]x++[/inlinecode] is known as a prefix increment and [inlinecode]++x[/inlinecode] is a postfix increment. Most commonly you will use a prefix increment (loops and such) ie., [inlinecode] for(int i=0;i < 10;i++) [/inlinecode] | |
Re: You would cast it like this [code]cout<<"The letter in the middle is " << (char)((c1+c2)/2) << endl;[/code] Your usage of the word alphabet is incorrect however. Alphabet denotes the entire list of letters. The way you use the word is what "letter" means. | |
Re: You can't really do that unless you use a frame and links on the page would open in the frame instead of their own separate page. Also, try not to use three returns after every few words It's annoying. | |
Re: The section you're looking for is Job Offers in the IT Water Cooler forums up at the top there | |
Re: Unfortunately this debate will be rendered moot with the release of IE8 and Firefox 3 since both pass the [URL="http://www.webstandards.org/files/acid2/test.html"]Acid test[/URL] with flying colors. I know, Microsoft following standards? *gasp* And although Firefox currently is easier to develop for CSS, IE is much better with Javascript and AJAX (since AJAX … | |
Re: The simplest way is to have that content section an iframe then to load that you would set the link's target attribute to the id of the iframe ie., [code=html]<a href="test.html" target="MyIFrame">Open this in the content</a>[/code] | |
Re: Just a wild guess here but I'd say you haven't seen any of the giant text on every forum that says we don't give homework help to people that don't make an attempt. Please show us some code and we'll help you with what you need to improve upon and … | |
So Firefox 3.0b2 was released and though I'm constantly cringing since my add-ons obviously don't work yet I must say I am very pleased. There is a noticeable difference in the amount of memory being used, I've been using it all day long and I have yet to see it … | |
Re: Just as an example this would stop a submit button from submitting. [code]<input type="submit" onclick="return confirm("Are You Sure?");" />[/code] If they accept then it continues, if they cancel nothing happens. | |
Re: [code]$first = $row->First Name; $last = $row->Last Name; $femail = $row->Father's Email; $r_state = $row->Return State/Zip;[/code] umm. No, though PHP is nice it doesn't speak english. No spaces in variable names, you can't use the descriptions and definitely no quotes in them. You have to use the field names so … | |
Re: Because it is case sensitive, [b]public[/b] is a keyword, [inlinecode]Public[/inlinecode] could be a class or anything really. | |
Re: Well given that you're only pulling data from one table adding the table name in front of each field is unnecessary. Just try [inlinecode]SELECT * FROM score_detail WHERE candidate_id = '$GETURLCAND_ID' and set_nbr = '$GETURLSET_NBR'[/inlinecode] Also, as a little heads up. You aren't cleaning your get data in the least. … | |
Re: Please stop the madness! Replace all of this [code=php] $mnation2=$row["mnation2"]; $midnodate=$row["midnodate"]; $midplace=$row["midplace"]; $mbirtharabic=$row["mbirtharabic"]; $mbirthplace=$row["mbirthplace"]; $mcheq=$row["mcheq"]; $medu=$row["medu"]; $mname=$row["mname"]; $mstep=$row["mstep"]; $mmarital=$row["mmarital"]; $msex=$row["msex"]; $mgsm=$row["mgsm"]; $uid=$row["uid"]; $msale=$row["msale"]; $mtype=$row["mtype"]; $amm=$row["amm"]; $tott=$row["tott"]; $mlogin=$row["mlogin"]; $mtitle=$row["mtitle"]; $mfirst=$row["mfirst"]; $mmiddle=$row["mmiddle"]; $mlast=$row["mlast"]; $mrefer=$row["mrefer"]; $memail=$row["memail"]; $mphone=$row["mphone"]; $mstreet=$row["mstreet"]; $mcity=$row["mcity"]; $mcountry=$row["mcountry"]; $mnation=$row["mnation"]; $mbranch=$row["mbranch"]; $mdate=$row["mdate"]; $mend=$row["mend"]; $mbank=$row["mbank"]; $mip=$row["mip"]; $domain=$row["domain"]; $domainx=$row["domainx"]; $mbirth=$row["mbirth"]; [/code] with this [inlinecode]extract($row);[/inlinecode]. … | |
Re: Most MUDs do it by binding a port so whenever someone connects to the port it returns the who list like [url]http://www.example.com:4545[/url] I've seen in done with SMAUG codebases so searching the snippets on the SmaugFUSS or AFKMud repositories will most likely turn up results or guides. | |
Re: He was referring to Salem's avatar which states that void main'ers are doomed. [inlinecode]void main()[/inlinecode], main should always return an int ie., [inlinecode]int main()[/inlinecode] | |
Re: It doesn't work because you don't need to surround the link with script tags for that inline javascript to work. The [inlinecode]<a href="http://www.yahoo.com" onClick="alert('popup');">click this link</a>[/inlinecode] will work just fine on its own. | |
Re: This is a quick and dirty implementation of the Microsoft API to change console color [code=c++] enum Colors { blue=1, green, cyan, red, purple, yellow, grey, dgrey, hblue, hgreen, hcyan, hred, hpurple, hyellow, hwhite } void set_tcolor(short int a) { HANDLE handle = GetStdHandle( STD_OUTPUT_HANDLE ); // Make a handle … | |
Re: [code=php]$purl = $resultat->product_thumb_image; echo "<img src='test/image/products/".$purl.".jpg'/>";[/code] Firstly you don't need disambiguation parenthesis when there's no ambiguity. Secondly look at the source of the page that is displayed on and see what is actually output. If it just says [inlinecode]<img src='test/image/products/.jpg'/>[/inlinecode] then [inlinecode]$purl[/inlinecode] isn't being set. | |
Re: [QUOTE=nav33n;498913]You can't use C or C++ to create a web application. You need a server side scripting language for a web application (or a dynamic web page, Eg, registration form, login form, etc). php, asp, jsp, asp.net etc are some server side scripting languages. If your site is static, which … | |
Re: Well the javascript would be something along the lines of [code=javascript] var newElement = document.createElement('option'); newElement.text = <name variable here>; newElement.id = <id variable here>; newElement.value = <whatever else here>; var targetSelect = getElementById('whatever the select id is'); try{targetSelect.add(newElement,null);}catch(ex){targetSelect.add(newElement);} [/code] That creates a new element then adds it as a … | |
Re: [inlinecode]int main1()[/inlinecode] should be [inlinecode]int main()[/inlinecode] but as the poster above me stated that particular include file is not necessary. Also, [inlinecode]#include "iostream"[/inlinecode] should be [inlinecode]#include <iostream>[/inlinecode] Quotes are generally used to reference headers that require an absolute path or headers in your project. | |
Re: It's impossible to get data from a database with only HTML/DHTML. If they expect you to then they should be fired. HTML is a completely static language. There are no facilities of a programming language aside from Server Side Includes. | |
Re: Well first and foremost I wouldn't consider MySpace the best place for a professional business website. However, you don't need any programs to style MySpace it just involves taking hold of the already available classes or using exact selectors ie., [inlinecode]a[href^="/blah"]{color:red}[/inlinecode] sets all links that link to a page beginning … | |
Re: PHP has quite a few built in sort functions like sort, natsort, asort, etc. See [URL="http://us.php.net/manual/en/function.sort.php"]http://us.php.net/manual/en/function.sort.php[/URL] | |
Re: Well what are the errors, that's like taking your car into a shop and saying, "Something's wrong". Aside from the seemingly random placement of braces. | |
Re: Here is a decent Drupal book [URL="http://www.amazon.com/Pro-Drupal-Development-John-VanDyk/dp/1590597559"]http://www.amazon.com/Pro-Drupal-Development-John-VanDyk/dp/1590597559[/URL] however, you might want to pick up an introductory PHP book such as this [URL="http://www.amazon.com/Programming-PHP-Rasmus-Lerdorf/dp/0596006810/ref=pd_bbs_sr_2?ie=UTF8&s=books&qid=1198104311&sr=1-2"]http://www.amazon.com/Programming-PHP-Rasmus-Lerdorf/dp/0596006810/ref=pd_bbs_sr_2?ie=UTF8&s=books&qid=1198104311&sr=1-2[/URL] As for the second book I love O'Reilly published books they are generally extremely easy to understand while still being very comprehensive. | |
Re: Well a label tag works in this way [code=html] <label for="test">Test:</label> <input type="radio" name="test" /> [/code] You place your label's target outside of the label tags | |
Re: [URL="http://us3.php.net/manual/en/install.php"]http://us3.php.net/manual/en/install.php[/URL] | |
Re: It's called a lighbox. Doing a google search for lightbox will pop up countless results though the best is probably this one [URL="http://www.huddletogether.com/projects/lightbox/"]http://www.huddletogether.com/projects/lightbox/[/URL] | |
Re: Heh, that was his signature, his reply was the link to the ActiveX tutorial ^^^ Post vvvv Signature | |
Re: I would like to add two things, simple sockets and simple multi-threading, the latter of which is already in discussion. Sockets in C++ are a nightmare whereas in Java it's [inlinecode]Socket mySocket = new Socket(3000);[/inlinecode] and bam, you have a socket. | |
Re: The password protection is most likely coming from an apache directive. Refer to the documentation which most likely explains it. | |
Re: Yes, the two most common dev platforms are the WAMP(Windows, Apache, MySQL, PHP) and LAMP(Linux, Apache, MySQL, PHP) stacks. If you are using Windows, as nav33n said, you would want the WAMP stack. | |
Re: Well mailto links launch the viewer's default email client. It doesn't actually send an email, you would need an emailer in PHP such as the one in the PEAR package for example if you would like an email form. | |
Re: If you are a teacher then you should at least know the procedures to get a site unblocked. Especially a site that is in no way illicit. Speak with your network administrator preferably the superintendent as well. There is absolutely no reason to block this site, especially in a learning … | |
Re: [code]<input type="hidden" id="txarea" value="something here" />[/code] | |
Re: It is done with the title attribute with the link [code]<a href="blah.com" title="This is blah" >blah</a>[/code] Will show This is blah when hovering over the link | |
Re: [URL="http://www.asciitable.com"]http://www.asciitable.com[/URL] | |
Re: I refer you to the php manual on persistent connections. [URL]us3.php.net/manual/en/features.persistent-connections.php[/URL] |
The End.