1,038 Posted Topics

Member Avatar for Piney

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]

Member Avatar for Piney
0
47
Member Avatar for jespester

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.

Member Avatar for Cryptoanalysis
0
125
Member Avatar for kaushik259106

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]

Member Avatar for ShawnCplus
0
78
Member Avatar for lydia21
Re: help

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 …

Member Avatar for lydia21
0
87
Member Avatar for hooray

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.

Member Avatar for ShawnCplus
0
81
Member Avatar for crzycm16

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]

Member Avatar for nav33n
0
282
Member Avatar for sassy14udd

It's not a script, it's just an iframe. For future reference try to spell out your words, that was incredibly confusing.

Member Avatar for kiwisites
0
123
Member Avatar for woocha

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.

Member Avatar for woocha
0
121
Member Avatar for ShawnCplus

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 …

1
60
Member Avatar for armend90

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.

Member Avatar for ShawnCplus
0
81
Member Avatar for Venom Rush

... I'm not entirely sure why'd you write your own function when the built-in addslashes function works perfectly well.

Member Avatar for Venom Rush
0
214
Member Avatar for eleonora

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]

Member Avatar for ShawnCplus
0
185
Member Avatar for number87

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.

Member Avatar for ShawnCplus
0
87
Member Avatar for Grantmitch1

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.

Member Avatar for ShawnCplus
0
96
Member Avatar for jimpossible2k

The section you're looking for is Job Offers in the IT Water Cooler forums up at the top there

Member Avatar for ShawnCplus
0
98
Member Avatar for raw.nic

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 …

Member Avatar for TheAlex
0
178
Member Avatar for DakDuif

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]

Member Avatar for ShawnCplus
0
124
Member Avatar for rab786

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 …

Member Avatar for ShawnCplus
0
97
Member Avatar for ShawnCplus

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 …

Member Avatar for ukerbel
0
158
Member Avatar for OmniX

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.

Member Avatar for OmniX
0
104
Member Avatar for usc87bb

[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 …

Member Avatar for usc87bb
0
92
Member Avatar for snitch321

Because it is case sensitive, [b]public[/b] is a keyword, [inlinecode]Public[/inlinecode] could be a class or anything really.

Member Avatar for snitch321
0
98
Member Avatar for mgn2683

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. …

Member Avatar for ShawnCplus
0
74
Member Avatar for tariq04

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]. …

Member Avatar for vssp
0
160
Member Avatar for mgdesmond13

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.

Member Avatar for mgdesmond13
0
93
Member Avatar for Karkaroff

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]

Member Avatar for Karkaroff
0
251
Member Avatar for k2k

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.

Member Avatar for ShawnCplus
0
53
Member Avatar for zeroground

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 …

Member Avatar for invisal
0
182
Member Avatar for angwy83

[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.

Member Avatar for vssp
0
102
Member Avatar for kv79

[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 …

Member Avatar for kv79
0
102
Member Avatar for xaviergxf

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 …

Member Avatar for ShawnCplus
0
58
Member Avatar for peeta

[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.

Member Avatar for peeta
0
120
Member Avatar for x3n1x

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.

Member Avatar for x3n1x
0
153
Member Avatar for Nikki Precel

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 …

Member Avatar for MidiMagic
0
114
Member Avatar for dbayo

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]

Member Avatar for dbayo
0
157
Member Avatar for revenge2

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.

Member Avatar for rajatC
0
105
Member Avatar for majestic0110

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.

Member Avatar for majestic0110
0
161
Member Avatar for SergioQ

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

Member Avatar for SergioQ
0
103
Member Avatar for majestic0110

[URL="http://us3.php.net/manual/en/install.php"]http://us3.php.net/manual/en/install.php[/URL]

Member Avatar for majestic0110
0
221
Member Avatar for rosanda

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]

Member Avatar for ShawnCplus
0
81
Member Avatar for gabs

Heh, that was his signature, his reply was the link to the ActiveX tutorial ^^^ Post vvvv Signature

Member Avatar for ShawnCplus
0
83
Member Avatar for ithelp

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.

Member Avatar for Salem
0
116
Member Avatar for Fenerbahce

The password protection is most likely coming from an apache directive. Refer to the documentation which most likely explains it.

Member Avatar for Barefootsanders
0
233
Member Avatar for azalia

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.

Member Avatar for ShawnCplus
0
89
Member Avatar for Roebuc

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.

Member Avatar for Roebuc
0
103
Member Avatar for Teech

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 …

Member Avatar for Teech
0
158
Member Avatar for vardhani
Re: Form

[code]<input type="hidden" id="txarea" value="something here" />[/code]

Member Avatar for vssp
0
120
Member Avatar for Taffd

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

Member Avatar for Taffd
0
101
Member Avatar for #include<DAN.h>
Member Avatar for guy40az
0
124
Member Avatar for cancer10

I refer you to the php manual on persistent connections. [URL]us3.php.net/manual/en/features.persistent-connections.php[/URL]

Member Avatar for ShawnCplus
0
89

The End.