Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

2001.

Solve : WYSIWYG or text editor??

Answer»

I have used some of the 'what you see' features to look at code vs. what is produced. I was going to ask a very general syntax question, but I think I'm going to start a separate thread.

The only reason I'm talking about Dreamweaver is that my better half, who's in school, got Adobe's CS 2 from one school, and the school to which she switched sent her CS 3. I thought I might access Dreamweaver thru her CS 2.

Since I think I want to do programming, I probably should concentrate on the languages...now, let me run off and POST my burning question.

No Microsoft didn't recommend that, if they did I would know I was talking to someone who didn't know what they were doing. The upgrade is the same as the full version on almost all types of programs, if it wasn't it would have the potential to cause a lot of issues. My best assumption is that it has something to do with how my drives are setup and/or how many files it has to open since it seems to only crash occasionally when linking to another page and it's having to scan through thousands of HTML pages and images.

If you're curious about it there is a trial version on their site that allows you to run the full program and play with it.I understand...

What I was thinking, though was that you said you used the upgrade program to upgrade Front Page...instead of a clean INSTALL of the program itself. There is a difference...though it may be slight.

I will try the program...I also noticed the trial version when I visited their web page.

I'll let you know how it goes...only issue is that I don't think I'll be forking out $299 any time soon.

Thanks, again, Nathan...I voted, so I might as well post:

I'm a newbie at web design; Dw CS3 is my graphical designer of choice-- haven't figured it out yet completely though. It seems to like to create lots of code. Someday I'll learn how to edit it.Yes, I was warned that Dreamweaver was going to generate a lot of code, and your observation bears out that warning.I've NEVER been a big fan of WYSIWYG. For awhile, I tried USING a program called ActualDrawing and it was actually fairly useful, but programs like that tend to have limited functionality. I have DreamWeaver, but I can't really get myself to use it. Every time I try, I get frustrated and end up going back to Notepad, which is what I have always used, ever since I first started learning any type of coding. I write all of my (X)HTML, CSS, JavaScript, and PHP/MySQL codes/scripts in Notepad, unless I'm unable to for some reason. When I'm debugging errors, I'll switch to Notepad++ to make it a little easier.Interesting -- I guess I'd never even considered what software I was going to use to write if I didn't use Dreamweaver. Right now, my main focus is making corrections and improvements to an existing site. I'm using HTML Kit for that, and it seems all right.

2002.

Solve : HTML -input type file?

Answer»

I have a problem with my input field for selecting an image. Whenever I click the button to browse for the image Firefox closes down. It IE7 it works ok.<BR>
Code: [Select]<form ACTION="#" method="POST" enctype="multipart/form-data">
<p><label for="PoiLongitude"><strong>Ime kategorije:</strong></label>
<input type="text" name="nova_kategorija" id="nova_kategorija" SIZE="30" /> </p>

<p><label for="PoiLongitude"><strong>Ikona kategorije:</strong></label>
<input type="file" name="datoteka" class="textbox" size="30" /></p>
<p><small>(*.BMP in MAX. 24x24 px)</small></p>
<br />
<p><input type="submit" name="vnesi_kategorijo" id="vnesi_kategorijo" value="Vnesi" /></p>

</form>works fine for me in firefox.... what version of firefox are you WORKING with? I've got 2.0.14Yeah I got that to. and i saw that the issue is just on my side which makes it really weird. Im gonna reinstall Firefox.

2003.

Solve : How do I, put an add to favorites button on my website?

Answer»

I want to add, an ADD TO FAVORITES BUTTON on to my website, I have the HTML code to do this, but I don't know if im SUPPOSED to WRITE my website addrsess somewhere. Here is the HTML code. Any HELP here would be great.





CHEERS JeffSee Putting An "ADD TO FAVORITES" Button On Your Page (javascript).

Or, this: Create an "Add to Favorites" Button (HTML)

Does that help?that jarva script was realy GOOD, did it strightaway. Thanks foy the help

Cheers Jeff

2004.

Solve : Your URL will only work without the “www”.?

Answer»

Can someone tell me what this mean, The URL will only work without the "www"

I have tied this with the www and it doesn't work. Anyone know what happening here, and how I can change it, so that it works the right WAY.

Cheers Jeff



.

this is an example:

if you tried typing www.1234.com and something says that URL wil only work without the 'www'

I think it means that if you typed 1234.com it will work and no other way.Quote from: jeff57 on April 24, 2008, 05:38:15 PM

Can someone tell me what this mean, The URL will only work without the "www"

I have tied this with the www and it doesn't work. Anyone know what happening here, and how I can change it, so that it works the right way.
without the "www" may be the way the website developer intended it to work. For example, http://support.microsoft.com/. So in other words, I cannot do anything about it now. Is that what your saying.Is this a website you're developing? How are you uploading your web pages? Are you paying a hosting service to host your site?I am useing Window Live Small Business website design. So I kind of just followed the instructions as to designing the website up. So maybe im not supposed to have the www in it.

Cheers JeffNo I didn't design the site myself, like I said im useing this live business package, and all the pebpages are uploaded as soon as I click save. I get 500 mg free, then if I WANT TO i CAN ADD EXTRA STORAGE SPACE. £7.99 PER MONTH FOR 2BG. Doesn't seam to exspensiveDid you REGISTER a domain for your website? What immediately follows the http://, your website name or something required by your hosting service?Yes I registered a domain name: benidorminfo.co.uk

Cheers jeffIf i type benidorminfo.co.uk in the search engine of yahoo it doesn't find my website. But if if type it in the http slot at the top of the screen, it does stright there.

Don't REALLY know whats happening here.This is exatually what comes up in the http slot, when I type Benidorminfo.co.uk.

http://benidorminfo.co.uk/default.aspxQuote from: jeff57 on April 24, 2008, 06:21:12 PM
No I didn't design the site myself, like I said im useing this live business package, and all the pebpages are uploaded as soon as I click save.
Seems like a contradiction here. You didn't design it, but you upload web pages.

Do you do any developmental work on the site using web design software installed on your computer, or do you update web pages via a web browser interface?

Does your hosting service provide a user control panel, or "cPanel", that you can logon to and manage your website files?With this live small busines package from windows. You just go to one of there templetes and start to input the things you want on each page, like photos & text, paypal buttons and so on. But once you click save, it on the INTERNET strightaway, as you are building it.
I LOG on to there interface, and build my pages there, all very simple really. It just uploads them on to the website.Well, I haven't used Window Live Small Business and I don't believe I can really answer your question. I do some web work but do it in the conventional way, and the way you're doing it is not what I mean by conventional.

I suggest you visit http://myofficelivecommunity.com/discuss/forums/ and seek an answer there. You should have a much greater chance there of encountering someone familiar with method of editing web pages that you're using.
2005.

Solve : website not able to be seen in other countries?

Answer» HI
Can some one help me I have built 2 WEBSITES no problems.
One is with Yahoo www.qininternational.net Wording in Chinese!

One is with Homestead great web builder lots of templates and stock photos
www.qininternational.biz

All can be viewed in Australia but not in China I am not sure about othere countries.

What happened to Wide World Web?China.... ya, China is one of those crazy countries that won't let its people browse just any website. It has to get past the country-wide internet filter. My bet is they FLAGGED your site as a POTENTIAL anti-communist, or whatever, kind of website.
Nothing has happened to the Wide World Web. But a lot of ridiculous things have happened to the China Wide Web.

BTW, the sites show up fine here in the US.Shows up fine here too...
I agree with michaewlewis, this is very likely to be because of China's crazy web filtering.Both the websites look a bit chinees to me, but they both load up fine here in Spain.

Cheers Jeff
2006.

Solve : adobe photoshop 7.0 websites tutorialz?

Answer»

top sites where you can have adobe photoshop tutorials....any versions....THNK you...!!!!You have posted the same topic twice CLICK here and CONTINUE there because You have ALREADY been helped there .

2007.

Solve : Mailto FORM output formatting?

Answer»

Looking for a way to space out the output of a Mailto FORM. My Data is currently stacked TOGATHER and it would be nice to space it out like so. Not sure how to get a hard return or
into the output to space it out.

Name= John Doe

Problem= COMPUTER will not turn on

Computer Make/Model= HP DC5000


Currently the data is jammed together like below in an e-mail making it a burden to isolate pieces of data to copy paste into a PIECE of software for the service departments secretary.

Name= John Doe
Problem= Computer will not turn on
Computer Make/Model= HP DC5000could you show the code you use for the form and hpw it's processed?

2008.

Solve : Multi-line values.?

Answer»

I'm really starting to get the hang of PHP, but I would still only consider myself intermediate at best. My fiancé and I are looking at different houses right now and I thought I would make a SIMPLE little web site to help us keep track of the different properties we're considering. Basically, I just want a page that will display the different houses (and their related info) in tables. I could easily do this with HTML, but instead of having to code a bunch of tables, I thought it would be easier to simply create a form and use some PHP. For the most part, this is a lot easier, but I've encountered one small problem...if I enter more than one line of data into my Notes textarea, it causes the info to be broken up into multiple tables, and any data entered afterwards is displayed incorrectly. Take a look here for an example.

At the moment, I have three pages...
1. addhouse.html contains a form that allows me to enter whatever info I want.
2. addhouse.php stores the form info into a textfile (houselist.txt). More functionality will be added later.
3. showhouses.php retrieves the info from houselist.txt and displays it in tables.

If I only enter one line in the textarea, everything works PERFECTLY. I can make the info display on multliple lines if I manually insert line breaks when entering the data, but I would like to avoid that. When I press the Enter key, is there any way to make that translate into a /r/n line break?

To avoid major side-scrolling, I attached all of my files in a zip. And if it helps at all, I also attached what is currently in my houselist.txt file. It holds the information that is on the example page I linked to earlier. It should all be one line, not two...

I know it would probably be better to enter everything into a MySQL database instead (and it might be easier to work with), but I would rather use this METHOD because it's a lot easier to manually change data if necessary.

[recovering space - attachment deleted by admin]I think all you need to do is convert your \n\l to

http://us2.php.net/manual/en/function.nl2br.php
Thanks for the link. Some of these functions sound like they do what I need them to do, but so far, none of them are doing it QUITE right. I'll have to toy around with some of these for a little bit.you could also try:

Code: [Select]$notes=str_replace("\n\r", "<br />", $notes);

I know you don't want to use a MySQL dB because you said it was easier to modify data manually, I disagree.

If you use XAMPP or WAMPP for you localhost server, I can help you do this with MySQL.

Quote from: Astoria on April 24, 2008, 02:16:03 PM

I know you don't want to use a MySQL dB because you said it was easier to modify data manually, I disagree.

If you use XAMPP or WAMPP for you localhost server, I can help you do this with MySQL.

But what if you don't know how to code sql with php?

Quote from: Astoria on April 24, 2008, 02:16:03 PM
you could also try:

Code: [Select]$notes=str_replace("\n\r", "<br />", $notes);
Correct me if I'm wrong, but doesn't that do the exact same thing as nl2br?Quote from: michaewlewis on April 24, 2008, 03:35:26 PM
But what if you don't know how to code sql with php?

And that's why I offered to help him with that
In my experience the PHP/MySQL combo is so much easier than messing with text files.


Quote from: michaewlewis on April 24, 2008, 03:35:26 PM
Correct me if I'm wrong, but doesn't that do the exact same thing as nl2br?

Yes my bad. I should've checked it. I didn't know they upgraded it from
to
.
However, what nl2br does is, replace "\n" with "
", it doesn't replace "\n\r" with "
".
But nl2br should work fine for him.For me personally, the text file is easier. Maybe it's just me, but if I want to make a change to a couple of properties (i.e. change the address of one and the price of another), it would be quicker and easier to simply open up the text file and make the change super quick. Coding the SQL commands or accessing the database through PuTTY takes too long for it to be worth the effort, especially when I don't plan on making too many changes.

Now, if I had a large table with hundreds of arrays, then I agree that the suggested methods would be more efficient. Just in case it ever comes down to that, I've set up a primary key, but I don't expect this list to ever surpass 100 entries/arrays. Another thing I should note is that my site is currently residing in my section of the school server. Once the semester is over, I probably won't have access to it anymore, so the text files will make it easier for me if/when I transfer the site to a different server. I'm sure there's probably a way to do this via SQL, but something like that is beyond anything I've learned so far.

Oh, and Astoria, your suggestion does exactly what I want. Well, I had to change the "\n\r" to "\r\n", but other than that, it works perfectly. It seems so simple that I'm surprised I didn't figure it out for myself. I was just looking at it differently, I suppose. Anyway, thanks a bunch, you just made my form a lot friendlier.


Also...
Quote from: Astoria on April 24, 2008, 03:48:03 PM
However, what nl2br does is, replace "\n" with "
", it doesn't replace "\n\r" with "
".
But nl2br should work fine for him.
You are correct that there is a slight difference. This difference is what makes nl2br not work for me. I believe it may be because I'm working with a server running on a Windows OS rather than a Linux OS (don't quote me on this). All I know is I need to use "\r\n" for a new line. So, when I use nl2br, instead of getting this result:

1
2
3

I get this result:

1

2

3

It CONVERTS the \n to a
, but leaves the \r as is. At least, that's how it appears to me. But I've got a solution now, so that's all that really matters to me. Heh.Quote
because I'm working with a server running on a Windows OS rather than a Linux OS

that could very well be the reason nl2br didn't work. linux does have a different return code than windows.Yeah, that's what I'm assuming the problem is. One of the first things we learned in my class is that Windows, Linux, and Mac all have different return escapes...I just can't remember which belongs to what OS. Heh.
2009.

Solve : ActiveX in Frontpage 2003!?

Answer»

I have used Visual Basic 6 to CREATE 3 ActiveX controls, Music.lib, Music.exp, and Music.ocx. I cannot, HOWEVER, find out how to USE these files in frontpage, since I wish to play a song on the page. (I could easily find the code Googling, but I'm old SCHOOL and would rather find out how it works). So how do I use one, or all, of the files to run my ActiveX in an Html script?

2010.

Solve : Scrolling text?

Answer»

I would LIKE to add scrolling text to a website. Can anyone give me some help on this?You mean like a marquee?? If its in html just SAY what you want goes between the two. You can also custimze the text but I THINK you can HANDLE it.Thank you so MUCH Squall. I can handle the rest. Have a good day.
DrossNo prob

2011.

Solve : Building an eBay ad template and having some bother?

Answer»

Hope you guys and gals can help....driving myself and a junior designer to distraction here....

We've got the rudimentaries of an ad template ready to use on EBAY but there's one little (major) snag.....

We've built the page using html and decided to add a nice little EXTRA that would allow sight of a large box that would transpose images that a customer can hover over the thumbnails of next to the main image.

It's fine when there are the requisite number of images for the product (there are four thumbnail spots). Problem arises when there's only one image available to REFERENCE to as we're then left with 'thumbnail 2', 'thumbnail 3', etc. in firefox and the blasted little red crosses in ie.

Is there any way you guys and gals know of that we can effectively say 'head for image 2 but if not there, do not display ANYTHING', etc.?

I can show our part completed code (or just the relevant part) if required...

Cheers,

Eedjdo you have an online sample that you can show us? I'm having trouble understanding what you're trying to do.Sure, I probably didn't articulate it very well. The {{ stuff is template tags that refer to an image (shorter than URL's).



[/url]


[/url]



[/url]


[/url]


An example of what I'm looking for is something along the lines of.... HTTP://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=260235094293&ih=016&category=63889&_trksid=p1742.m153.l1262

It's being built in dreamweaver btw. If it can't be a rollover then static will be just fine but can't figure it out at all!!!

Thanks for replying btw check this out... http://www.dynamicdrive.com/dynamicindex4/thumbnail2.htm
If you want, you can use this entire script instead of writing your own. Or you can use it for reference since it's doing the same thing.Hi Michael, gave it a bash but still displays the little red crosses when it can't reference any other images than image 1.

As an example, we want something that's intuitive enough to realise that if there is no image, it won't display anything at all.

i.e. if there's four, it will display four (that works fine). I was hoping for something relatively intuitive that would have a script to look for four but if there were only two, it would display the two without showing little red boxes where there were no images available to reference to.

2012.

Solve : Hosting and Domains?

Answer»

Hey everyone.

I need opinions here guys/girls. A buddy and I are STARTING a few websites for some clients of ours. We are going through a general ONLINE hosting company (not our own server). here is the question. Should we open a new account with this online hosting company for each client or have our account and just add domains back to back. I am asking because I'm not sure how much business we may do in the future.

Lets also say for example that we are not concerned with bandwidth or storage space.

Thanks in advance.If it were me...I'd keep the domains separate. Only because these clients may want to expand on their own domains down the road....by adding subs and such.

I KNOW you're not concerned with bandwidth and storage...but don't you think it would be better to keep the entities separate?

Also...are you looking to make money off of the hosting...or does this even concern you at all?The hosting I am not worried about. We have several promotions that would keep US from running up a high server cost. Eventually we may get into our own server but for now even if we are paying a small hosting fee we will just roll it into the contract. It's just a process. I'm sure you know that.

We were thinking the same thing. Keeping the domains separate would allow the client to expand and it would also create less work for us in several ways. We just wanted some other opinions on what other people are doing are what they think.

Thanks for the feedback! I used to run a web design business, too, and we had about one web host for 3-5 domains depending on the requirements of the client. Of course, we had to do a little BIT of scripting/checking to make sure that when you typed in one site you wouldn't end up at one of the other sites. Excellent point and suggestion. Right now we have our sites (3) on one host. Don't think we should be adding much more to a server. Gets a little "involved".

Thanks!

2013.

Solve : Contents of HTML Frames?

Answer»

I understand the very basics of creating an HTML pages with frames. I can't figure out how to load content into each frame.





OK, I mean to render four columns down the page. How do I get content into each column?

I'm looking at the w3.org site, and the problem is I wish the examples were better set up to show what adding content to each frame yields, and from where they get the content.

Thanks!If you want they need to be five pages the content of all four, then the frame its self point to the pages. In other words the content pages are made the same as any other page, just that when you put the framset in to have it load it will cause it to break into four seperate parts in the window. I can't seem to find anything to tell me exactly how to do the pointing, or where the "targets" should be located. I mean, in my poor example, I'm trying to get my first frame to read the contents of a file I have in the same directory as all the other html files.

I'm still reading.To point links to a certain frame, you need to give the frames names.

Example:

Code: [Select]<frameset cols"50%, 50%">
<FRAME SRC="menu.html" name="menu">
<FRAME src="main.html" name="main">
</frameset>

Now, if you have a link in your menu and want it to open in the main frame you do:

Code: [Select]<a href="link.html" target="main">Link</a>
Thank you, Astoria. That should help.

I know frames are not so favored. I'm just "faking" a page upgrade for a friend until I can get a better handle on CSS and other tools.Quote

<html>
<head>
<title>2004 Poster Session (Orlando, FL)</title>
</head>
<frameset cols=25%, 25%, 25%, 25%>
<frame src="2004frame1.htm">
<frame src="2004frame2.htm">
<frame src="2004frame3.htm">
<frame src="2004frame4.htm">
</frameset>
</html>

All right, I've created this simple frameset to have four columnar frames. Each .htm document is uploaded to the server, but when I look at the page, it is completely BLANK. Shouldn't there be four columns of data?try

Code: [Select]<frameset cols="25%, 25%, 25%, 25%">

And what is the name of the file?
It should be index.htmNo, foolish me, I'm trying to load those four different files -- one into each frame.
So the command will only work with an index.htm file? If that's the case, frames aren't going to do me any good.

Forgive my frustrations. I truly appreciate your help.

I have doc files with words in four columns. If I could just cut and paste, that would be great, but I need to figure out how to html format the columns.

I am reading what I can find on the web now. Any input is appreciated -- I just want you to know I'm not sitting back waiting for someone to fix it for me.Well, from that code it looks like every htm file should load into each column separately.

And no, the name does'nt have to have the name index.htm.

But here's why i said that:

let's say you're website's adress is: http://www.mywebsite.com

Now the browser will automatically look for a file CALLED index.* or default.*, with * being html, htm, php

So if you named the file with the frameset "framesetblahblahblah.html", than you have to type in your browser:

http://www.mywebsite.com/framesetblahblahblah.html

naming a main file index.htm is easier.

I hope I explained that so you understand.

Btw, the HTM files that go into each frame, do they all start with:
etc etc?

They all should be COMPLETE htm files.

If I can give you a tip, why don't you just use a single page layout?
You could just use a table with four columns


Quote
If I can give you a tip, why don't you just use a single page layout?
You could just use a table with four columns

Thank you! May the Universe bless you! Frames are killin' me -- I think I shall do better with tables.

I understood your explanation.

I just thought I was gonna be slick, that's all... Here what I did to learn it, sorry it took me so long to get back an every thing. Your probably not point exatly to the file, HOWEVER I found dreamweaver exteremly helpful when doing stuff like this.
2014.

Solve : URL in Form Results?

Answer»

I have the same form on numerous URLs. I need to know which URL was used when a person enters information in the form. Can the URL be included in the form results? If so how would you do that?yes you can, with PHP.

What I would do is add the following code to each page:

Code: [SELECT]<?
$url = $_SERVER['SERVER_NAME'];
$page = $_SERVER['php_SELF'];
?>

Than add a hidden field to each form (so the user won't see it):
Code: [Select]<input type="hidden" name="page_url" value=""http://".$url.$page">

That way you know from what URL each form was submitted.I TRIED your solution but I can't get it to work. The hidden field WORKS fine if I replace the value=""http://".$url.$page" with something LIKE value="test" so it has to be something in the code.try:

Code: [Select]
<input type="hidden" name="page_url" value=\"http://.$url.$page\">That doesn't work either. The results information ALWAYS shows " \"http://.$url.$page\" ".

2015.

Solve : Java script button help.?

Answer»

I ve found this is in Javascript question form.
Ive copied the form and intend to change the values with my own subjects.Question is how do i get
the button at the bottom to tally up the scores?
How do i get it to work? THANKS
The script is as below;


英会話のレベルチェック 準中級



1) "How many times have you been to China?" "_____."


  • One times.

  • Twice.

  • Twice times.

  • Only one.







2) _____ you ever been to Paris?

  • Did


  • Have

  • Do

  • Has







3) I _____ my SISTER since last week.

  • aren't seeing

  • don't see

  • didn't see

  • haven't seen







4) "What about pizza?" "I'd rather ______ a sandwich."

  • to have


  • have to

  • having

  • have







5) "What are your plans tomorrow?"

  • " I'm going to the office."

  • " I went to the office."

  • " I go to the office."

  • " I shall going to the office."







6) Choose the correct sentence.

  • If I were you I will study hard.


  • If I were you I'd study hard.

  • If I am you I'll study hard.

  • I'd study hard if I'll you.







7) Do you _____ to go and see him in the HOSPITAL?

  • must

  • should

  • have

  • will







MADONNA is the singer _____ sang "Holiday."

  • who's


  • where

  • whose

  • who







9) I'd prefer one _____ has a handle.

  • who

  • which

  • witch

  • where







10) Choose the correct sentence.

  • I've seen just Chris.


  • I've Chris just seen.

  • I just have seen Chris.

  • I've just seen Chris.







11) "What did he say?"

  • " He me told that he really liked you."

  • " He told me that he really like you."

  • " He told me that he really liked you."

  • " He told me that he has really liked you."







12) Don't WAIT, I _____ late.

  • can


  • might to be

  • can't be

  • could be







13) Well it's nine o'clock, he _____ running late.

  • could

  • must

  • must be

  • must to be









So where's the JS at? This is all HTML you're showing.

You NEED either a JS file, or the script within the HTML and with the function:
checkAnswers(). This is the function that's called upon when the button is clicked.

From what you show, there is no JS.

2016.

Solve : Making a Site?

Answer»

I build a site for some guy in html an I was USEING frames but he doesn't have that MANY links. So I put in a side bar that pops up when you scroll over it. But I dont really like it, what do you use when you want links? Not if you want links but how there seen. Also, how do you chose the colors? Like to make it look like a 5th grader didn't do it.Website Navigation Tips

You may also want to look into some neat menu and navigation scripts at DynamicDrive.com.Thanks just what I was looking for. You're WELCOME...GLAD I COULD help.Quote from: squall_01 on January 30, 2008, 06:21:36 AM

I put in a side bar that pops up when you scroll over it. But I dont really like it, ...
Such side bars are used a lot, as you may know. What did you not like about it?Just the way it is. Not the bar codeing or the bars themselfsYou have anything that will show you the code not to be picky but since I thought that it would be easier to do it this way. I've tried several others but I didnt care for the way it looked against it.I ment like how the code works. A preview of the code when its running
2017.

Solve : PHP/MySQL help - Warning: mysql_fetch_array(): supplied argument is not a...?

Answer»

Hello.

I'm currently learning php and mysql. I've set up a local "wamp" host on my pc to test my websites. All I want is to simply list the content from a test database I've created. Here's my code for my php FILE.

<?php

//Login details
//Host, Port, Username, Password
//
$host = 'localhost'; //Def localhost
$port = '3306'; //Def 3306
$user = ''; //Def blank or root
$pass = ''; //Def blank
//

$connect = @mysql_connect($host.':'.$port.','.$user.','.$pass) or die (mysql_error());
echo ('Connected!');

$database = mysql_select_db('mydb');
$sql = 'SELECT * FROM persons';
$result = mysql_query($sql);

while($rad = mysql_fetch_array($result)){
echo ($rad[firstname].$rad[lastname].'
');
}
mysql_close($connect);

?>

When I test my PAGE in the browser I get the following output:
Connected!
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in F:\wamp\www\FAILS\mysql\mysql_connect_alt2.php on line 18

Acording to the error this is the line causing the trouble:
while($rad = mysql_fetch_array($result)){

Any help is well appreciated!Code: [Select]<?php

//Logindetails
//Host,Port,Username,Password
//
$host='localhost';//Deflocalhost
$port='3306';//Def3306
$user='';//Defblankorroot
$pass='';//Defblank
//

$connect=@mysql_connect($host.':'.$port.','.$user.','.$pass)ordie(mysql_error());
echo('Connected!');

$database=mysql_select_db('mydb');
$sql='SELECT*FROMpersons';
$result=mysql_query($sql);

$NUM=mysql_numrows($result);
$i=0;

while($i<$num){

$firstname=mysql_result($result,$i,"firstname");
$lastname=mysql_result($result,$i,"lastname");

echo"$firstname$lastname<br/>";
}
mysql_close($connect);

?>

Thanks for the relpy but it still outputs an error :/

Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in F:\wamp\www\FAILS\mysql\mysql_connect_alt2.php on line 19

Also, changing mysql_numrows to mysql_num_rows(): does not help either. Gives this:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in F:\wamp\www\FAILS\mysql\mysql_connect_alt3.php on line 19Try this:

Code: [Select]<?php

//Logindetails
//Host,Port,Username,Password
//
$host='localhost';//Deflocalhost
$port='3306';//Def3306
$user='';//Defblankorroot
$pass='';//Defblank
//

$connect=@mysql_connect($host.':'.$port.','.$user.','.$pass)ordie(mysql_error());
echo('Connected!');

$database=mysql_select_db('mydb');

//Retrieveallthedatafromthe"persons"table
$result=mysql_query("SELECT*FROMpersons")
ordie(mysql_error());

//storetherecordofthe"persons"tableinto$row
$row=mysql_fetch_array($result);
//Printoutthecontentsoftheentry

echo"FirstName:".$row['firstname'];
echo"LastName:".$row['lastname'];

?>

2018.

Solve : Opt-in email form help??

Answer»

Ok... I'm trying to figure out how to create an html form to allow folks to ENTER their email for me to SEND them updates and such. Can anyone help me out with how to do this?

I KNOW how to write a basic form, it's collecting email addresses I'm having problems with. You can do it with PHP in combination with a MYSQL database.

2019.

Solve : Where did you first learn web design - HTML, CSS etc.??

Answer»

Self taught quite a BIT of HTML. We're LEARNING how to USE DREAMWEAVER in class.

2020.

Solve : coding for smooth site loading?

Answer»

Hey guys, got YET ANOTHER question for you all.

I need to put some head coding in to fix loading and stuff, what happens now is when it loads for first time it loads each seperate image and shows it loading (so its unsightly as it loads), I want to put some code in so the page doesn't show until the images are loaded (so it looks more smooth for viewers).

I guess I do not know what I am talking about, so if anyone gets it please help me out lol.

Also I need to know how to make it so the page loads when people TYPE in the address without putting www in it, like address.com instead of www.address.com IF anyone knows the code for that please let me know-- also any other meaningful code you think I could use to increase loading time and efficiency of the site [like caching].Something that may change the load time on your page is the size of all your graphics. What is the average size of your graphics? You should try to compress them as much as you can without making them look bad. A lot of times, you can make a 500kb jpg compress into 50kb, which would virtually eliminate the slow loading. You can also preload images, but try compressing them before muddying up your code with preload scripts.

For the second question, I believe that is a server issue and is nothing you can fix with html. Who is your webhost? The one's I've dealt with show the same information in the www.address.com as in address.com.Quote from: michaewlewis on May 23, 2008, 11:01:19 AM

For the second question, I believe that is a server issue and is nothing you can fix with html. Who is your webhost? The one's I've dealt with show the same information in the www.address.com as in address.com.

With FreeHostia, you just start off with "address.com" and have to add the "www" yourself as a subdomain. At least, that's what I had to do.Quote from: michaewlewis on May 23, 2008, 11:01:19 AM
Something that may change the load time on your page is the size of all your graphics. What is the average size of your graphics? You should try to compress them as much as you can without making them look bad. A lot of times, you can make a 500kb jpg compress into 50kb, which would virtually eliminate the slow loading. You can also preload images, but try compressing them before muddying up your code with preload scripts.
What graphics? I really don't see a lot. He uses a lot of Flash, but not too much graphics.Quote from: Indienation on May 22, 2008, 08:16:12 PM
Also I need to know how to make it so the page loads when people type in the address without putting www in it, like address.com instead of www.address.com
I wonder what percentage of Internet users STILL don't know they can just enter address, i.e. from address.com, in the box for the web address and hit Ctrl/Enter for any .com domain. The BROWSER (both IE and Firefox) will automatically add the .com and, if necessary, the www.Quote from: soybean on May 25, 2008, 10:01:30 AM
Quote from: michaewlewis on May 23, 2008, 11:01:19 AM
Something that may change the load time on your page is the size of all your graphics. What is the average size of your graphics? You should try to compress them as much as you can without making them look bad. A lot of times, you can make a 500kb jpg compress into 50kb, which would virtually eliminate the slow loading. You can also preload images, but try compressing them before muddying up your code with preload scripts.
What graphics? I really don't see a lot. He uses a lot of Flash, but not too much graphics.

How did you figure out that he uses a lot of flash? He didn't GIVE that much information...... Just right click on a part of the web page where an ad or animation appears. That will tell you whether Flash is being used. For example, here's a screen print of part of his page:
http://i7.photobucket.com/albums/y256/farmpond/forums/Flash.jpg

Now, he may not have actually created the Flash content himself. He's probably getting the coding for it from another source, such as an advertiser, and inserting it into his page. But, regardless of how he obtained it, he's clearly using Flash in his website.I don't remember him giving an address for his website. I doubt his site is www.address.com........Oops, how did I not recognize that?
2021.

Solve : JS FILE PROBLEMS?

Answer»

Hey I am having a problem with the js file's, I have a multi-directory folders, in the main FOLDER I have: header.js, and footer.js, I was to PLACE the .js file through out the directories, I tried using the ../header.js, and the ../footer.js but it does not work!! Any one can HELP with this!!!! (P.S I am trying to get rib of the .js connands in each directory, but trying to have them once in the MAIN folder!!) thanks for your help!!

MIKEIf this isn't solved could you provide us with additional information and if possible a URL to the WEB PAGE using the .js file. Unfortunately reading this post a few times I couldn't understand the question.

2022.

Solve : need help with form?

Answer»

I am making a simple ENTER email and submit form and I made a graphic for the 'submit' option I need to know how I can MOVE the submit graphic closer to the input email address form [they are seperated down by a p'] its to long to put it by its side, so how do I decrease the space between the two.

It looks like

|_______________ EMAIL


|_____SUBMIT____|

I want it to be

|____________|
|____________|

Basically as close as the two can mash together, thanks to whoever can provide an answer.If you're using HTML, try using a
instead of a

to separate the two.If you're willing to put out the effort, you could learn some CSS, which would make this sort of thing much easier. You'd be ABLE to position things however you want. But for a quick fix, you can give Steve's suggestion a shot.Quote from: CBMatt on May 21, 2008, 03:09:50 AM

If you're willing to put out the effort, you could learn some CSS, which would make this sort of thing much easier. You'd be able to position things however you want. But for a quick fix, you can give Steve's suggestion a shot.
Okay, I got it to work so it looks nice now.

I do want to learn some CSS but because of the tight schedule I want to finish the website without it; then once I know I am in the clear I can begin learning CSS and more javascript and all the other goodies so I can improve on the website from there and learn it at a more reasonable pace.

Well going to post another question - just finished the entire layout and put the frontpage on the hosting server to show possible investors, close friends and business associates.

Thanks for the help you two. Understandable. It's a lot easier to learn CSS as you're designing a site (it can be tricky once the design is complete); however, I know it is to be so pressed for time. But once you get the knowledge, you'll be happy you did.Yeah, I mean I got the index page basically done-- just got to fix some html [like I need to get a program for the join mail list form [which I am having trouble doing], and then just kind of fixing up code for loading times...

Then I need to make all the other PAGES [about 30], which includes an online store which we'll be using Paypal since I most definitely don't have the skill or knowledge to build a secure payment site nor the time.

But once its done I can just play around with improving it and its efficiency, my goal is to make it atleast good enough to be accessible and good enough to RUN well [even if it is not entirely time efficient for me].

2023.

Solve : how to save and read text file in PHP..? need help asap...?

Answer»

Hi...

in PHP code,
How can I SAVE TEXT? and to read text file and fill in text area?
can you please share just a piece of code....I really NEED it..asap!!!


thanks in advance....


USE the fwrite function to save the text file
fopen to read the text file and input the array into your text area

2024.

Solve : email?

Answer»

Hi, I am purchasing making a website this week from SBI who apparently run you through everything. The only thing I am not sure about is how do I place my NEW website domain which I am GOING to build on to my email as I am not sure. Could you please tell me in simple terms as I can only remember doing it once many years ago, and I am not very up on connecting back to internet? thank you for any help. Quote from: podlod on May 15, 2008, 06:32:22 AM

The only thing I am not sure about is how do I place my new website domain which I am going to build on to my email as I am not sure.
Can you clarify this a bit? Do you want to have email addresses such as [emailprotected]? Do you have a hosting service for your website? Have you registered your domain name with a domain name REGISTRAR?Hi Soybean, the answer to your answers are no to all, I am still toying whether to purchase something which is called SBI which actually shows you what to do and you choose your domain name and they in turn place your domain name for you, help you with your host, and they also show you how to design etc; your website, and also help to get more traffic. This is my first time for a website, and having to do all this myself is very daunting to say the least, and I want it perfect as it is for my small BUSINESS. Can you give me any ADVICE on a reasonably priced site that could help you with all this? thanks for any help. You could try Yahoo! Hosting. They have an online interface that helps you design your site. You can even pick from some of their ready-to-go templates if you like.
2025.

Solve : Need help with site and Firefox?

Answer»

This is my first try at building a REAL SITE. I've used frontpage 2003 to build it as a friend of mine uses frontpage and said it was the easiest to use. Being a linux user my skills at MS products are a little old and rusty. Anyhow......

My site http://www.floridasunshineshuttle.com seems to have some kind of a delay or flash per se when you use FIREFOX. The template links render in the middle of the screen for a brief moment then the page comes up. This doesn't seem to be the case when someone uses IE. It also doesn't happen when using konqueror. When using OPERA it only happens on certain pages not all.

Is this a case of MS not wanting to play nicely or do I have a problem somewhere?Seems to work equally well in IE 7 and Firefox 2.0.2.14 on my COMPUTER. You didn't get that delay before the page opened?

I'm using FF 2.0.0.12. Wonder if that makes a difference?OK, upon repeating this, I did notice a difference. In Firefox, I first see just a blue background with the text links that are supposed to be on the left side of the page displayed in the center of the page. This quickly resolves and the page displays the full content in its final form. The total time for the page to fully render in IE and Firefox seems to be about the same. So, when you said "delay", I guess I was expecting something more.

I don't know yet what causes this difference. If I have a chance to look at it in more detail and notice something that might be the cause, I'll post here again. In the meantime, someone else may have a suggestion. Yes, that is what I meant was happening. It seems strange that it happens in some browsers but not others. Also some pages are affected while others are not.I think I may have figured out what the problem is, it was the live help addition. I've since deleted and reinstalled and it seems to have fixed the problem for the most part but do still it on some pages but not all the time.I just browsed quite a few of your pages, using Firefox, and they all displayed fine. Seems like you've solved the problem.

2026.

Solve : web page help?

Answer»

This is probably a simple question but I KNOW only alittle HTML and very little CSS. When I make a web page everything shows up on the page I want it but when I resize it everything moves on the page how do you make it so that when u resize the web page nothing moves on the page the page just gets smaller so you can see less. Can you only do that with CSS or can you do it with HTML? Again I'm pretty new to web design so I'd appreate the HELP thank you.Quote from: rockstar4cs on May 18, 2008, 01:35:20 PM

... how do you make it so that when u resize the web page nothing moves on the page the page just gets smaller so you can see less. Can you only do that with CSS or can you do it with HTML?
Your wording is confusing. I believe what you REALLY mean to say is, How do you make the page elements remain in a fixed position, even when you shrink your BROWSER window? In other words, when the browser window is reduced in size, the vertical and/or horizontal scroll bars will appear and scrolling is then needed to view the whole page. Am I right?

You can do that with HTML and the way you can do it is to used number of pixels in your width attributes in your table tags, rather than percentages for width attributes or simply not using width attributes. For example, creates a table 500 pixels wide and 400 pixels high. You may find that putting the entire page in a table (with fixed width) and then putting tables inside that outer table the best way to control your pages. yes thats what I ment thank you for your help
2027.

Solve : Need an explanation of XREF?

Answer»

I'm creating a website in my home computer.

What is the proper syntax to refer to a file in a different drive than your web home (C:\webhome).

I tried HREF="G:\DIR1\dir2\filename" and HREF="G:/dir1/dir2/filename" and neither worked.

Or is it even possible to do.

Any help will be greatly appreciated.

CCLet me get this straight...is this a site you have online or are you only hosting it locally on your computer?

Also, would you be able to post more of your code? A small little snippet like that isn't going to be helpful because there could be SEVERAL issues that we can't see.Quote

I'm creating a website in my home computer.

I think he just created an HTML file on his local pc.

@Crazy Cuban:
Make sure the folders (dir1 and dir2) do not contain any spaces.
For example:

"Folder one" should be renamed to "FolderOne" or "Folder_one".

Now I have to note that this will not work if you have an Apache server (like XAMPP or WAMPP) installed (your webpage will have the URL http://localhost/website). Here the root is http://localhost/ and you can not refer to files on different drives.

Although it MAY work on your home pc, it's bad practice to create href's like that.
Just a tip, let the root of your website be the root. Your root is C:\webhome.
Any files you want to refer to PLACE them in the root, or in a subfolder of the root.


TXS for the replies. As I feared, XREFs can not be made to other drives. The problem is the size (many, many GBs) of the referenced files.

CC

2028.

Solve : "NO SPAM" Image?

Answer»

If you are registering with some websites, they show an image which has letters and numbers etc.
They ask you to type what you see in the picture. But if you refresh the page, the image changes.

How do you do this?

Thanks. it's called CAPTCHA, do a google on that and you'll FIND what you needThe OFFICIAL site should be a good START...

http://www.captcha.net/captchas/Thanks guys - problem solved.
Awesome, glad to hear it.

2029.

Solve : email address?

Answer»

Is there any way to attach an email address to a WEB page other then using Outlook Express?<BR>Thanks, Drossyou mean, not mailto?Email Link
Quote from: michaewlewis on May 07, 2008, 01:24:21 PM

Email Link


By clicking that link your standard email program will open.you could use forms and cgi, depending on your host.You can use the built in function in PHP for sending mail.

Quote from: hmar on May 12, 2008, 12:34:29 PM
you could use forms and cgi, depending on your host.

If your host uses a Linux server READ this article: http://www.w3schools.com/php/php_mail.asp

If your host uses a Windows server read this: http://www.w3schools.com/asp/asp_send_email.asp

This is the way to use PHP mail:
Code: [Select]<html>
<body>
<?php
if(isset($_REQUEST['email']))
//if"email"isfilledout,sendemail
{
//sendemail
$email=$_REQUEST['email'];
$subject=$_REQUEST['subject'];
$message=$_REQUEST['message'];
mail("[emailprotected]","Subject:$subject",
$message,"From:$email");
echo"Thankyouforusingourmailform";
}
else
//if"email"isnotfilledout,displaytheform
{
echo"<formmethod='post'action='mailform.php'>
Email:<inputname='email'type='text'/><br/>
Subject:<inputname='subject'type='text'/><br/>
Message:<br/>
<textareaname='message'rows='15'cols='40'>
</textarea><br/>
<inputtype='submit'/>
</form>";
}
?>
</body>
</html>Kinda funny how a SIMPLE hotlinking question can turn into a MINI PHP tutorial.Quote from: CBMatt on May 15, 2008, 06:10:32 AM
Kinda funny how a simple hotlinking question can turn into a mini PHP tutorial.

Indeed... nice to see you again chris.What can I say?Quote from: michaewlewis on May 15, 2008, 09:22:37 AM
Quote from: CBMatt on May 15, 2008, 06:10:32 AM
Kinda funny how a simple hotlinking question can turn into a mini PHP tutorial.

Indeed... nice to see you again chris.

Thanks. School's out for a little bit, so I'm trying to spend a little more time around here.
2030.

Solve : How do you make an image change with time??

Answer»

I've been trying to find an answer to this QUESTION for a long time now: how do you make an image change with time?
For example, I have a picture I want to change into another one in THREE days.. Is there a code for that?your best bet would be to use PHP to SWITCH pictures determined by a time span.Too bad I have no idea about how to do that try browsing the scripts in www.dynamicdrive.com and SEE if there's anything close to what you are looking for.

2031.

Solve : Streaming music vs linked download to protect it question?

Answer»

I was wondering how you could stream music vs ADD a link that will allow download to PROTECT it?

Is there a SOFTWARE app I will need, JAVA script, or some HTML that I am UNAWARE of that will do this?

Thanks

2032.

Solve : Need Help - music in webpage?

Answer»

Hello;

I tried a SNIPPET from a CODE site, to PLAY a small mp3 file on a webpage, but the music will not repeat, EVEN though the code says it should...

Here's the code they told me to use:

<script language=JavaScript>
<!--
if (navigator.appName == "Netscape") {
document.writeln("<embed SRC=song.mp3' volume=-700 repeat=true loop=true repeat=true autostart=true hidden=true>")
}
if (navigator.appName == "Microsoft Internet Explorer") {
document.writeln("<bgsound src='song.mp3' volume=-700 loop=true repeat=true autostart=true hidden=true>")
}
//--
</script>

It autostarts fine, and is hidden - but that's all... no repeat / no loopinstead of using "true" as a value, try "1" as a value (1 equals true, 0 equals FALSE).

2033.

Solve : download link?

Answer»

how to make a download link for a file so that if any one clicks the link a popup APPEARS asking the viewer to download or CANCEL the file.. ? if i put NORMALLY with a link to the file in web it just plays or open withing the browser.. so how to make a popup link?You can make a free download link with google pages (page creator). Sign up with them (requires a Gmail account). Upload your file (max size of 100 MB, and they may not support certain files/file types, e.g. mp3's). Then get/copy the url and link to it.

You can also use free online storage sites, and also your own ISP (contact them), or your own web server, etc, to upload files, so that they can be downloaded once the link is clicked,

My example here (using the codes from this forum for the first example):

1. Code: [Select]Download My Freeware Links in [url=http://internetonlinecash.googlepages.com/FreewareLinks.doc]Word (39 kb)[/url].

But generally you would use:

2. Code: [Select]<a href="http://internetonlinecash.googlepages.com/FreewareLinks.doc">Download My Freeware Links in
Word (39 kb)</a>

Which for both codes above in reality is this: Download My Freeware Links in Word (39 kb)
You then click on the ACTIVE link - Word (39 kb) - to download/cancel the document...

Hope this helps...

2034.

Solve : Firefox/IE parsing issues?

Answer»

Hey guys,

First want to say thanks for the forum I think it's a great place for designers and developers to expand on what they already know.

Had a question about some problems I am having using a blog form called mybloggie. In IE the page renders fine but in firefox there is spacing between the tables. I have looked at the CODE and TRIED to remove code to isolate the problem but I can't seem to figure it out. Any help would be greatly appreciated.

The site is: http://www.crossfithoboken.com/blog

Thanks in advance for the help, this has been driving me nuts.I see no spacing when I look at the page using Firefox...Me EITHER. kabledesigns, what VERSION of Firefox are you using? What resolution settings do you use on your monitor?

The only difference I noticed between IE and Firefox is that, with Firefox, I see an olive border down the right side; it's about 1/8 inch wide. Firefox Version: 2.0.0.14

The navigation is separated by a space between the top logo correct? There shouldnt be any seam (or gray) between the navigation and "forging elite fitness." Also, the black area around the green/yellow navigation is much thicker than it should be. Are you guys SEEING these differences?

I noticed them on here:

http://www.browsershots.org OK, I see it now, due to your more detailed description. Probably something in your HTML coding or CSS coding. I don't have time now to try to analyze it. Will try to look at it again tonight or tomorrow.

Can you describe how you understand your coding is supposed to work for that part of the page? Are you controlling that part of the page through CSS or with tables coded directly into your HTML file?Okay I found it, after much time it is of course a small issue.

In the first cell I had a

where the logo image was. Removing that fixed the issue. Thanks for your help!

2035.

Solve : Problem With Printing?

Answer»

Hi - I'm new with this HTML business, and just recently volunteered to help with the website for our non-profit community association. Our website is defined as a collection of three frames. Everything works well, except during printing. It either only prints the content of one of the frames (leftmenu.htm referenced below), which consists only of navigational links, or prints the content of each frame on a separate sheet of paper. I would LIKE to have everything printed as one document exactly as it APPEARS on screen. I tested with both Firefox and Internet Explorer. I don't know what causes this problem, but I suspect it has something to do with frames. Am I on the right track? Please help!

Here is the source code for the index.htm file:

http://www.w3.org/TR/html4/frameset.dtd">


Garden Villas









This is Garden Villas Web Site


You're completely right, that's one of the evil's of frame usage.
Usually only the frame that's in focus will be printed.

I know it's not much help, but see it as a good recommendation:

STAY AWAY FROM FRAMES!!!!!

There are LITERALLY tons of free single page CSS layouts on the web (just go a google on "free CSS templates").

Here's a read about frames:

http://www.html-faq.com/htmlframes/?framesareevilif you really want to use frames, there is a solution. Create a print button in each page that will show a printer friendly page.Thanks for the information and all your advice. Well, the fix is not going to be as easy as I had hoped, but at least I won't be going down the path of thinking that something is wrong with the frame set-up.

This is a cool forum. I'll be a regular visitor from now on.I think cause you have one frame selected over the other an its only seeing that one, I would just open it an try printing right off but I suppose thats what you are doing. I recommened that you use dreamweaver to do this if your not already cause doing it in notepad is a pain. Also, you can setup tables to look like frames if you dont really need to use them. BEST of luck. Quote from: MaiBeadz on May 08, 2008, 12:15:51 AM

This is a cool forum. I'll be a regular visitor from now on.

Welcome aboard!
2036.

Solve : TopSites Script?

Answer»

Hi,

can any ONE figure out or KNOWS what top sites script are xtremetop100.com , topgamesites.net or gamingsites100.com using?

I've searched the web for a script similar to the ones used by the sites above, but i couldn't find it.

thanks

I find it ... or not...

still NEED HELP



2037.

Solve : Rotator Script Problems?

Answer»

rite, im new here, but i did do a search and nothing came up...

Im not great at all this computer talk, so i'll need to be guided through.

Im using dreamweaver, and i hve a site all up, yaadaahyaahdaah ...ultimatly its all good.

i have a Rollover image, and what i would like is that which i click on it ... it take you to a random page (from a list of 20ish preselected URLs)

i have a LOOK on internet and it was saying something about Rotator Script.

i have no idea what they are going on about?
how dod i do what i wana do?

thanks guys if you have KNOWLEDGE of PHP you could use the "rand" function, something like this:

Code: [Select]<?php
$num=rand(1,20);

if($num=="1"){
echo"<ahref=\"http://www.site1.com\"><imgsrc=\"image1.jpg\"></a>";
}
ELSEIF($num=="2"){
echo"<ahref=\"http://www.site2.com\"><imgsrc=\"image2.jpg\"></a>";
}
elseif($num=="3"){
echo"<ahref=\"http://www.site3.com\"><imgsrc=\"image3.jpg\"></a>";
}

etc
etc
?>
thanks for the reply.
unfortunatly i have no idea about PHP although i have heard it a LOT when researching how to do this ....

dont suppose there is a set-by-step guide tht you could give me ?Quote from: eonbar on May 04, 2008, 10:49:54 AM

thanks for the reply.
unfortunatly i have no idea about PHP although i have heard it a lot when researching how to do this ....

dont suppose there is a set-by-step guide tht you could give me ?

Not if you're unfamilair with PHP, sorry.

If you're serious about web design you may want to try an online PHP tutoria. Trust me, it's really not that hard.would something like this work? http://www.dynamicdrive.com/dynamicindex14/flexislide.htm
if it would work, you can add a function into the script to randomize it.

If you're just wanting a random text link, that's easy enough to do with a javascript. I've got a script I made a few years back that does that.
2038.

Solve : How to insert the data from the DropDown Menu?

Answer»

hello guys, i need some HELP regarding on php. i am a beginner on this thing.
my problem is that how can i insert my data from my dropdown menu into my database?

please help me to solve this problem.
here is my code:

Code: [Select]$sql_select = "SELECT name FROM topic ORDER BY id";

$result = mysql_query($sql_select,$db);
$frm = "topic";

echo '<select name="'.$frm.'" id="'.$frm.'"><option value="">Select one…</option>';


while($topic_array = mysql_fetch_array($result)){

echo "<option value=\"".$topic_array[0]."\" >".$topic_array[0]."</option>\n";


}

echo '</select>';


?>




I will really appreciate some help/tips on how to solve this..

Thanks in advance.
I think you mean getting the data from the dB and into a dropdown menu?

Code: [Select]$sql_select = "SELECT name FROM topic ORDER BY id";

$result = mysql_query($sql_select);
$frm = "topic";

echo "<select name=\"$frm\" id=\"$frm\"><option value="">Select one…</option>";


while ($data = mysql_fetch_assoc( $result ) ) {
$topic=$data['name'];
echo "<option value=\"$topic\">$topic</option>\n";


}

echo '</select>';


?>
um, my problem is that how to insert my data into my database... since i've already manage to get my data from my database.. I guess I don't get what you want.
You create a pulldown from data PULLED from the database, and now you want to insert it again?Quote from: Astoria on April 29, 2008, 11:19:36 PM

I guess I don't get what you want.
You create a pulldown from data pulled from the database, and now you want to insert it again?


yes! that's exactly i want to do. how to insert it again.OK., well here is a form that will insert the SELECTED option into a dB.

Code: [Select]$sql_select = "SELECT name FROM topic ORDER BY id";
$result = mysql_query($sql_select);

echo "<form action=\"\" name=\"testform\" method=\"POST\">
<select name=\"topic\" id=\"$frm\" onChange=\"document.testform.submit\">

<option value="">Select one…</option>";

while ($data = mysql_fetch_assoc( $result ) ) {
$topic=$data['name'];
echo "<option value=\"$topic\">$topic</option>\n";
}

echo "</select>
</form>";

if(isset($_POST['topic'])) {

$SelectedValue=$_POST['topic'];

mysql_query("INSERT INTO table
(fieldname1) VALUES('$SelectedValue')")
or die(mysql_error());

echo 'Data inserted';
}

?>

In the last part, the INSERT part you need to change the values ofcourse to the names you use.ok i will try the codes that you gave me.

thanks a lot!
2039.

Solve : html email address?

Answer»

Hi folks,
I'm trying to add an email address to a web site.
The email address is

I continue to get a Microsoft outlook error.

Can you
HELP.

I think this is an Outlook problem since the email link looks good to me.please post more info about what you are trying to do and the ERRORS associated with your problem.Quote from: Dross on April 27, 2008, 08:47:51 AM

Hi folks,
I'm trying to add an email address to a web site.
The email address is

I continue to get a Microsoft outlook error.

It's incomplete. It needs to be something like this:
Code: [SELECT]<a href="mailto:[emailprotected]"&GT;TRACY Streats</a>
2040.

Solve : tables and cells?

Answer»

I am creating a website using tables. Some of the cells are pastel and the text goes in those cells. As one moves from page to page in the website I want those blue cells to remain static (in exactly the same PLACE on each page). As of now they jump around a small amount. When I copy the HTML from one page to make a new page the cells stay put for those two pages until I CHANGE the text on the new page. So I have concluded that the PROBLEM is with the text that is put in the colored calls. How can I keep the cells in place from page to page? I have checked the WIDTH of the cells and that is the same on each page. I am using Front Page 2002.

Thank you for any help you can provide. Maybe make the cells slightly BIGGER and/or the text slightly smaller might help. I used repeating tables in one of my sites, and I found it better visually to have the table lines invisible...

2041.

Solve : PHP Login Setup?

Answer»

Okay, I tried codeing with php but I still don't understand it what I want is for it to use credit CARDS and CHECKS and send you a bill. AWAY to keep USER who loged on to stay on till they log off. Any one know how to do this? I've been using code that other people had PUT up but they dont really work so that I can modify it.OK, what you need to do is find an online tutorial about PHP sessions.

Here's a decent one:
http://www.tizag.com/phpT/phpsessions.php