kanaku 60 Posting Whiz

Use a dynamic and static salt combination?
Article from codeigniter -- but the concept is the same.

kanaku 60 Posting Whiz

Here is how to check if an input field is empty (javascript code):

var email = document.getElementById('email').value;

if (email == undefined || email == '')
{
alert('Please enter an email address');
}

First you get the 'value' of the text field and assign it to a variable for convenience (in this example, we used the email variable).
Then you'll check if the email variable is undefined (meaning no value was assigned to it) or if an empty string was assigned to it.

That's basically it. Change the value highlighted in red to the id of the field you want to check.

kanaku 60 Posting Whiz

Recall that you give a 'name' to a group of checkboxes/buttons in your html code like this. To easily loop through all the checkboxes, use the getElementsByName method. Here is a demo using checkboxes and radio buttons.

<html>
<head>
<script type="text/javascript">
function check()
{

	var group1 = document.getElementsByName('interests'); //assigns 'interests' checkboxes to group1 -- it becomes an array
	var checkedbox = false;
	var group2 = document.getElementsByName('gender'); // assigns 'gender' radio buttons to group2
	var checkedbutton = false;


for (i=0; i<group1.length; i++) //loop through 'interests' array
	{
	if (group1[i].checked == true)
	{// do something but for this example:
	checkedbox = true;
	break;
	}
	else
	{
	checkedbox = false;
	}
	}

	for (i=0; i<group2.length; i++) // loop through 'gender' array
	{
	if (group2[i].checked == true)
	{// do something
	checkedbutton = true;
	break;
	}
	else
	{
	checkedbutton = false;
	}
	}

	if (checkedbox == false) alert('Please check at least one box');
	if (checkedbutton == false) alert('Please check at least one button');
}
</script>
</head>
<body>

<form id="carinsurance">
<p>Check one or more[interests]:</p>
Design: <input type="checkbox" name="interests" value="design" /><br />
Sports: <input type="checkbox" name="interests" value="sports"  /><br />
Sleeping: <input type="checkbox" name="interests" value="sleeping"  /><br />

<p>Check one[gender]:</p>
Male: <input type="radio" name="gender" value="M" /><br />
Female: <input type="radio" name="gender" value="F"  /><br />
Its' complicated: <input type="radio" name="interests" value="IC"  /><br />

<input type="button" value="GO" onClick="check()" />
</form>

</body>
</html>

The red code corresponds to the checkbox-related script.
Green code is for the radio buttons.

kanaku 60 Posting Whiz

:icon_eek:

Cool.

kanaku 60 Posting Whiz

Have you tried checking the post here?

*meh... I don't have dreamweaver*

The code in there can be used for any program. I think dreamweaver allows you to enter your own code, right? Follow the same instructions in the thread but instead of typing it in notepad, type them in code view of dreamweaver.

kanaku 60 Posting Whiz

I only watched while my brother played the whole series... that's why I can't get over it. He'll only let me play up to that part where you get Ifrit in FF8 but won't let me use up a slot on his memory card (n years ago = kid = broke = no memory card).

But I do know quite a lot (how to get GFs, how to beat Ultimecia, the soundtrack for which city/boss, etc) for someone who didn't actually 'play'. =)

Although sadly it is impossible to get my hands on a copy of final fantasy 7.

Shame about that FF7. Most fans would say that it's one of the best in the series...

kanaku 60 Posting Whiz

Hehe... At last, competition!!! *brawl*

786

kanaku 60 Posting Whiz

no .... what i mean there is form the user have to enter all the information but when it com to this question which it asked if he need to add other information ..the user must select yes or no ..if he don't select massage will appear to alert him that he cant submit the form without selecting yes or no...

It wasn't clear the first time.

<html>
<head>
<script type="text/javascript">
function check()
{
	var o = document.getElementById('addyes');
	var t = document.getElementById('addno');
	
	if ( (o.checked == false ) && (t.checked == false ) )
	{

		alert('You must select whether you want additional drivers.');
		document.getElementById('additional').focus();
		return false;
	}
	else return true;
}
</script>
</head>
<body>

<p>Answer Me:</p>
<form id="carinsurance">
<p>Do you want additional drivers: (please check a box)</p>
<input type="radio" name="browser" id="addyes" value="addyes">add YES<br />
<br />
<input type="radio" name="browser" id="addno" value="addno">add NO<br />
<br />

Additional: <input type="text" id="additional" size="20" />

<input type="button" onClick="check()" value="Submit" />
</form>

</body>
</html>

That's just the functionality, you can change what happens inside the conditional. =/

kanaku 60 Posting Whiz

We have the same problem. =(

You can read through the comments here, you'll probably see similar symptoms with your laptop. The laptop-guy also replies to each comment. =)

kanaku 60 Posting Whiz

It's not in the recycle bin...? =(

Try this link.

kanaku 60 Posting Whiz

Perhaps you wanted something like this:

<html>
<head>
<script type="text/javascript">
function check()
{
	var o = document.getElementById('addyes');
	var t = document.getElementById('addno');
	
	if ( (o.checked == false ) && (t.checked == false ) )
	{
		var ask = confirm("Would you like to add drivers?");
		
		//if user clicked ok
		if(ask)
		{
		// do something
		document.getElementById('additional').focus();
		return false;
		}
		
		else
		{
		alert("Ok. Suit yourself.");
		}
	}
	return true;
}
</script>
</head>
<body>

<p>Answer Me:</p>
<form id="carinsurance">
<input type="radio" name="browser" id="addyes" value="addyes">add YES<br />
<input type="radio" name="browser" id="addno" value="addno">add NO<br />
<br />

Additional: <input type="text" id="additional" size="20" />

<input type="button" onClick="check()" value="GO" />
</form>

</body>
</html>
kanaku 60 Posting Whiz

Ok. There's a problem with the way you position your marquee... the marquee is covering the menu.

Try adding a holder to your marquee and styling it with CSS so it moves away from your menu. I highlighted the changes in red.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>JS</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
#marquee-div
{
float: right;
}
-->
</style>
</head>

<body>

.... here add the script for your menu ....



<div id="marquee-div">

... here add the script for your marquee ...

</div>
</body>
</html>

What I did was float the marquee div to the right. Just so you can see both of your scripts. Of course, it's up to you where you'll place the elements.

kanaku 60 Posting Whiz

i came on this web site thinking i could get genuine help .
within minutes of posting a question you mark it solved and forget about it .and i have still got a problem.i have one more question.
how do i unsubscribe from this useless site.

No one can mark the thread solved except for the person who made it... so you marked it yourself. (unless your cat snuck-in and played with the mouse while you looked away)

That's why no one paid much attention to your topic. They already thought it was solved. Not to mention your description wasn't very clear to start with. This is a community, not a customer-service-center. Perhaps you can keep that in mind next time you join a similar community.

Anyway, here are instructions on how to unsubscribe:

A. The Nice Way
1. At the very top of this site, beside the Daniweb logo is an image link to the control panel. Click that.
2. A pop-up menu with lots of options will.. uhm.. pop-up. Choose the one that says subscribed threads.
3. You will get a list of the threads/topics you're subscribed too. Just check the topics (or all of the checkboxes) and scroll down to the bottom of the list.
4. In the drop down labeled: Selected threads, choose Delete subscription.
5. Enjoy your clean inbox.

B. The I'm-Pissed-Off-and-Never-Coming-Back Way
1. Find a popular thread.
2. Post a load …

kanaku 60 Posting Whiz

Eh.. from what I've read so far, it seems that ASP is like PHP in that you can use it to retrieve records from a database and "echo" html code to the browser...

The first code I gave is the html part of the dropdown menu. That's what you'll use for the response.write portion of your code...

*offers her reputation, soul, and firstborn to misskeen for her stupid attempts at helping*

try this tutorial for generating a dropdown list with ASP

If you were asking how to label the drop down, just use <label></label> tags in HTML.

kanaku 60 Posting Whiz

Eh... I thought someone 'flipped' a website. In non-geek fashion. :D

But I've heard of 'flipping' before, I just didn't know it was called that. You seem to need some guts, luck, and clairvoyance to earn from flipping sites. Not for the weak-hearted.

kanaku 60 Posting Whiz

Surprisingly, there is a very helpful thread in the HTML/CSS section on how to make a sign-up and login/logout system using PHP.

Try the 2nd or 3rd post in that thread.

kanaku 60 Posting Whiz

Eep! I thought this was the html/css thread... *shrinks in shame*

I'll help you out though! *edits signature and searches for ASP tutorials*

kanaku 60 Posting Whiz

cod. (the fish hehe)

kanaku 60 Posting Whiz

Ssssh !!!!, Dont tell him about it, let him continue to post for us

This is a trap! They send someone to post for us to make the game results anomalous. When we finally reach 1000 they'll have the decision revoked on a technicality...

But what the hey, 790.

kanaku 60 Posting Whiz

Smileys should be provided in the quick reply section also...?

YES!
How else can you quickly respond to this question: "Can you please help me code a forum system from scratch? Can I do that with Dreamweaver? Will you advertise my forum in your site? Please?"

If the quick reply doesn't have this:
:sweat:


So... Can you please help me code a forum system from scratch? Can I do that with Dreamweaver? Will you advertise my forum in your site? Please?

kanaku 60 Posting Whiz

In your attachment, is this the page you see everytime you enter phpMyAdmin? Can you click on the 'house' button in the left panel to get to a similar window like in my attachment? Because if you can't then your host probably limits your access to creating tables only. =(

WAIT ----

I checked the 000webhost website and:

You also have access to phpMyAdmin which can be reached from your cPanel, you can also add, edit and modify MySQL privileges, create or drop databases and users, import / export MySQL database data.

from the hosting site
You should be able to navigate to the phpMyAdmin homepage! (the one in my screenshot)

By the way, how did you make the _secret table? (kindly describe what you did step-by-step) Because if you made it yourself then most likely, you started at the phpMyAdmin screen similar to my attached screenshot...


To answer your second post, yes I have a 'test-server' installed on my laptop. This is actually a good way to practice your php scripts because you can edit stuff without having to upload them to the internet. If you want to do that too, you can download xampp here.

The installer will do the whole installation for you (yey no configuration necessary!) but if you're stuck on some part of the installation you can ask here.

kanaku 60 Posting Whiz

Eep!
I have a lot of files in my desktop... it's more accessible than the other folders. Plus firefox automatically downloads stuff to the desktop. =( Thanks for the tip!

kanaku 60 Posting Whiz

i joined this web site this week .i posted a question,now i find it as been marked solved .thank you for your help.
frankytee.

You mean you solved it already? Ok. :-)

kanaku 60 Posting Whiz

Him? =(

kanaku 60 Posting Whiz

Happiness -- over 65 and working because I want to not because I have to.

Now I know why you're 'most valuable poster'... hehe ;-)

kanaku 60 Posting Whiz

I'm too cut back on bad food, and soda.

Give them to me then, I need to gain weight. Badly. ;=)

kanaku 60 Posting Whiz

Happy new year everyone!

May you have the same number of fingers today as you did yesterday... (or more fingers, if that's possible)

kanaku 60 Posting Whiz

Hohoho... hallu Stefan! You just joined last year, no? hehe

Anyway, have fun at daniweb... =)

kanaku 60 Posting Whiz

That's one of the most enthusiastic introductions I've ever read. haha

I'll only comment on your love of Final Fantasy: I still can't get over FF VII and VIII myself. =)

We already met in the HTML/CSS thread (geeky way to meet, I know) but again, welcome chili5! (Glad to know your gender, it's a bit tiring to write he/she everytime --- pffft political correctness)

kanaku 60 Posting Whiz

Cool name. Fab! Welcome and happy new year... =)

kanaku 60 Posting Whiz

Being allowed to live without leaving the house... that would make me die from happiness! --- oops, if I died, how would I live..? BAH! happy new year anyways. =)

kanaku 60 Posting Whiz

Hallu!

*tries to make ascii art*

*fails*

Happy new year!

kanaku 60 Posting Whiz

is this... your homework?

kanaku 60 Posting Whiz

*googles primary key... 0.0*

So I have to set voted_memberID and voter_memberID as primary keys?

Yey! Thank you so much for the advice. ;-)

kanaku 60 Posting Whiz

780

kanaku 60 Posting Whiz

You said you can access phpMyAdmin... when I asked about that, I meant, you can go to the phpMyAdmin screen which looks like (see the attached screenshot).

phpMyAdmin is sort of a user-friendly interface for working with your databases, it's not your database name.

If you contacted your web host and they told you to use phpMyAdmin, they probably meant that you use that (see screenshot).

kanaku 60 Posting Whiz

and what mite you suggest i use instead of absolute positioning?

It depends on what your design is. As for your current layout, it can be done with floats and a frequent check at possible values of the display attribute. ;)

kanaku 60 Posting Whiz

>.< Crusty logo image is taking up the whole top portion of your nav div. Set the attributes of your .logo class to this:

.logo{
border-style:none;
float: left;
}

Then change your search_bar class to this:

.search_bar{
display: block;
float: right;
margin: 30px 2px 0 0;
}

You can tweak the margins to fit your layout... I can't estimate how much margin you want.

kanaku 60 Posting Whiz

No! *stares at your signature...*

Will team B wake up in time to beat team A?

kanaku 60 Posting Whiz

776 *ladeedah*

kanaku 60 Posting Whiz

When I check your site, the page still isn't centered. Why is that?

It's size div.wrapper is still 100%. Tell me when you've updated your site so I can see how to fix the search bar.

kanaku 60 Posting Whiz

You can make a test database from there so you can get the database name right. Then add user access.

OR here's a walkthrough...

1. Open your phpmyadmin. The layout has two 'panes'.
2. In the right pane, there is an option to create new database. Type in the name of your sample database there (say, secret-database).
3. Then ignore the other options and just click on the Create button. Your new database will now show-up in the left-pane as secret-database (0) --- this means there are no tables (yet) in your database.

Next, let's add a user to the database.
1. Go back to the phpMyAdmin home page. On the right pane, click on Privileges (it's in the bunch of links below the Create New Database field).
2. You'll see a list of usernames there but let's try and make a new one for now... Click on the Add a new user link.
3. Now type the username you want (ie secret-user).
4. For the host, select Local from the dropdown menu and it will automatically fill-up the text-field.
5. For the password, you choose. =p For this example let's use badpassword.
6. Re-type the password.
7. Ignore the global privileges and just click GO.
8. You'll be sent to a new page (with the Global privileges section) but ignore that and scroll-down to database-specific privileges. On the drop-down menu, Add privileges on the following database:

kanaku 60 Posting Whiz

Try xampp if you want a quick install of php.

... I second the motion!

Installing php and apache separately might not be convenient for beginners. =)

kanaku 60 Posting Whiz

I tried your code (using my own password, username, and dbname). It works on my localhost.

Make sure that you are connecting to the right database and the user and password you're using have access to that database. Did you contact your host for the username, password, and database name?

There really is no other error possible besides the values. I can't provide you with those variables.

Can you access phpMyAdmin?

kanaku 60 Posting Whiz

Hallu! Happy new year!

kanaku 60 Posting Whiz

Ok... I was trying to code it all up from scratch and make new slices of your images but... I give up (sorry) because I have no idea what the site is for. And I need that to answer the following stuff about the boxes:

1. are they going to extend downwards?
2. are they fluid-width (meaning one set of background images for different box-widths)?
3. can I or can't I remove the transparency of the rounded corners. If you have a changing background, other than white, you need the transparency... if it will stay white for the whole time you're going to use this layout, you can remove the transparency of the corners (which is where all the problem is coming from in the first place...)

If you have a plain white background for the page, I suggest you open your original image files and disable the transparency. That was the initial problem. So if you make the corners a solid color outside the rounded outline (except for the top-right-star background), you won't see the extended borders anymore and you can revert back to your original code.


Here's how I would do it if I can't remove the transparency:

<div class="tab-div-1000">
	<div class="tab-header">
	Text/HTML
	</div>
	
	<div class="tab-body">
	Tab content goes here
	</div>
	
	<div class="tab-footer">
	</div>
</div>

<div class="tab-div-250-left">
	<div class="tab-header">
	Text/HTML
	</div>
	
	<div class="tab-body">
	Tab content goes here
	</div>
	
	<div class="tab-footer">
	</div>
</div>

<div class="tab-div-mid">
	<div class="tab-header">
	Text/HTML
	</div>
	
	<div class="tab-body"> …
kanaku 60 Posting Whiz

Wait... why are you connecting twice? (In line 10 and in line 18 of your dbConfig.php file)... Did you comment out the sample code properly?

And as I said, as long as the details/values are correct, you should be able to connect!

By the way, mysqladmin is most likely NOT your database name. It's something you can use to create databases and tables...

Can you post your dbConfig.php file? Be sure to comment out the values like this:

<?
// Replace the variable values below
// with your specific database information.
$host = "XXXXXXXX";
$user = "XXXXXXX";
$pass = "XXXXXXXX";
$db   = "XXXXXX";

// This part sets up the connection to the 
// database (so you don't need to reopen the connection
// again on the same page).
$ms = mysql_pconnect($host, $user, $pass);
if ( !$ms )
{
echo "Error connecting to database.\n";
}

// Then you need to make sure the database you want
// is selected.
mysql_select_db($db);
?>

Because I think you've accidentally made two sets of connection variables in your config file (thus the double-connection error).

kanaku 60 Posting Whiz

Ok I got the files, I'll try to work on them.

For the others who want to know what the problem is, this attachment shows the background of this middle divs overshooting... so the rounded corners effect is broken.

kanaku 60 Posting Whiz

Try adding padding-bottom: 6px; to the boxes with border-bottom. BUT that's a bit primitive. =(

Can you post the current html and css codes?

OR when you have the page open in your browser, view the source, copy all and post it here.

kanaku 60 Posting Whiz

770 :D