fobos 19 Posting Whiz in Training

Well the invalid argument is the name that your trying to give it. Now you can adjust this without using top and left, but i do this because when the user clicks on the link the popup window opens in the middle of the screen. If you dont want top and left, just delete them out of the string.

<script type="text/javascript">
var popUpWin = 0;
function popUpWindow(URLStr, width, height) { 
    if(popUpWin) {
        if(!popUpWin.closed) popUpWin.close();
    }
    // now this is where you can delete this "top and left".
    // If you do, delete, "top, left, screenX, screenY".
    var left = document.body.clientWidth/2;
    var top = document.body.clientHeight/2;
    var input1 = document.getElementById("input1").value;
    popUpWin = open(URLStr+'?param1='+input1, 'popUpWin', 'toobar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=no,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top+'');
}
</script>

<a onclick="popUpWindow('showduty.php',200,200)">click to open</a>

Hope this helps

fobos 19 Posting Whiz in Training

Ok so say we have users.php and i want to see someones profile using the "id" method. Just like what you said http://www.website.com/profile.php?id=1. Well if you have mysql database, just output the a field like names or something. Then with the name being outputed, just assign an href tag to them.. so
Page1.php

<?php
// connection
// output
$result = mysql_query("SELECT * FROM Persons");
while($row = mysql_fetch_array($result)) {
    echo "<a href='profiledispay.php?id=$row[id]'>".$row['FirstName']."</a><br>";
}
?>

Then on Page2.php

<?php
$id = $_GET['id']; // get var from URL
//connection
$result = mysql_query("SELECT * FROM Persons WHERE id = $id");
$row = mysql_fetch_array($result);
?>
<input type="text" value="<?php echo $row['FirstName']?>">

I really hoped this helped. basically when the user clicks on the name, the id is passed to page2 and you use the "get" method to grab the variable. Next we use it in the query to access only the row with that id. If you have further questions, please dont hesitate to ask.

fobos 19 Posting Whiz in Training

No offense, but the horizontal menu clearly tells you that its overlapping..lol

/* Submenus should appear slightly overlapping to the right (95%) and up (-5%) */
ul.MenuBarHorizontal ul ul
{
    position: absolute;
    margin: -5% 0 0 95%;
}

Just write the marins -5% to 0% for top overlap and 95% to 100% for left overlapping.

Just look for this code
ul.MenuBarVertical ul
and change the values. Hope this helps, please thank if it did

fobos 19 Posting Whiz in Training

No it doesnt require additional languages. To do this first you must initiate the connection and access the database and table.
In this we will user and name as fields in your table

<?php
// use variables to identify the user. session would be the best
$user = $_SESSION['username']; // whatever you want
$con = mysql_connect("host","user","pass");
if(!con) { die("Couldnt Connect" . mysql_error()); }
mysql_select_db("db",$con);
$sql = "SELECT * FROM table WHERE user = $user // this is whatever you want to define the user
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
?>

Now that you have connected to the database and the info is pulled, time to display it.

<form action="<?php $_SERVER['PHP_SELF']?>" method="post" enctype="multipart/form-data">
<input type="text" name="myname" value="<?php echo $row['name']?>">
<input type="submit" name="submit" value="Update">
</form>

The form is submitting itself to same page its one. Now let update..

<?php
// i like to seperate this from the pulling data. this way its only called when submit is pressed
if(isset($_POST['submit'])) {
    $con = mysql_connect("host","user","pass");
    if(!con) { die("Couldnt Connect" . mysql_error()); }
    mysql_select_db("db", $con);
    mysql_query("UPDATE table SET name = '$_POST[myname]' WHERE user = $user");
    // redirect to another page if you want.
    header("location:somepage.php");
}
?>

Let me know if this helped

fobos 19 Posting Whiz in Training

If the font increases after you click the link (the visited link), then look for a:visited in your css code and just lower the font size. Let me know if this helps.

fobos 19 Posting Whiz in Training

I might not be able to answer, but for everyones view can you please post your coding in order for people to help. thanks.

fobos 19 Posting Whiz in Training

Well if the pop-up window is a new paged that is displaying the data, then you want to pass the data via URL..

function passData() {
    var input1 = document.getElementById("input.name").value;
    window.open("showduty.php?param1="+input1);
}

Let me know if this is what you are looking for?

fobos 19 Posting Whiz in Training

well there is a couple of ways to do this. First, you could add the email address in the "action" of the form
Ex..

<form action="mailto:someone@yahoo.com" enctype="text/plain">

or PHP method..

<?php
$to = "somebody@example.com"; 
$subject = "My subject";
$txt = "Hello world!";
$headers = "From: webmaster@example.com" . "\r\n" .
"CC: somebodyelse@example.com";

mail($to,$subject,$txt,$headers);
?> 
If you get a problem using the php method, then you need to configure your SMTP in your PHP.ini. Hope this helps
fobos 19 Posting Whiz in Training

Check this web page out. It has really good examples of how to create a database with fields. Then i would use PHPMYADMIN to make it auto increment.

W3SCHOOLS

fobos 19 Posting Whiz in Training

Try this website, it has what you are looking for.

Click

fobos 19 Posting Whiz in Training

Try creating a seperate page to see if the variables are being passed after validating.

<?php
if(isset($_POST['submit'])) {
    echo $_POST['getName'];
    echo $_POST['getPass'];
}
?>

If they are, try this code.
I think i know what login script your using. If you want, this is the one that i was using..

checklogin.php

<?php
$host = "";
$username = "root";
$password = "";
$db_name = "";

mysql_connect("$host", "$username", "$password") or die("Couldnt Connect");
mysql_select_db("$db_name") or die("Couldnt select db");

$username = $_POST['getName'];
$password = $_POST['getPass'];

$username = stripslashes($username);
$password = stripslashes($password);
$username = mysql_real_escape_string($username);
$password = mysql_real_escape_string($password);

$sql = "SELECT * FROM table WHERE username = '$username' and password = '$password'";
$result = mysql_query($sql);
$count = mysql_num_rows($result);

if($count==1) {
    session_register("username");
    session_register("password");
    header("location:page.html"); // go here if login successful
} else { 
    header("location:wrong.html"); // go here if login failed
}
?>

let me know if this worked..

fobos 19 Posting Whiz in Training

when you display the tables, your mysql query should be

SELECT * FROM table ORDER BY id ASC or DESC // pick either ASC or DESC.

I think that is what you were talking about. If not, please post code so we can analyze it.

fobos 19 Posting Whiz in Training

Man i cant believe it was that easy. thanks again

fobos 19 Posting Whiz in Training

Here is something for your tool bag to use one element to show and hide content

$("#content").hide() // to hide the content onload
$("#text").toggle(function() {
    $("#content").show('slow')
}, function() {
    $("#content").hide('slow');
});
fobos 19 Posting Whiz in Training

Hello CF Coders,
I have another question. Basically i want to use a cfif statement with out haveing to use it until im ready. Ill give an example and problem i getting.

page.cfm

<body>
<cfif #URL.get#> or <cfif isDefined(URL.get)>
// execute code
</cfif>

<a href="page.cfm?get=this">click</a>
</body>

When i load the page, i get a "Element GET is undefined in URL" error. Basically i need to know how to do this like in php where i can call the if statement anytime and not get in error.. example of php

page.php

<?php 
if(isset($_GET['name'])) {
    // do something
}
?>
<a href="page.php?get=this">click</a>

If more clarification is needed, just let me know.
Im sure this is possible, but im stuck. Im on the Adobe Cookbook alot, but havent came across anything yet. I really appreciate the help if provided.

fobos 19 Posting Whiz in Training

Ok, if you can copy the values from the fields in editor 1, then this should be able to assign them to editor2.

With the onlick function that was shown, you have to get the values of the input fields in editor 1

function get() {
var input1  = document.getElementById("myinput").value
// now if its a span or input u have to use one or the other
//span
document.getElementById("myspan2").innerHTML = input1;
//input
document.getElementById("myinput2").value = input1;
}

You know, you shouldnt go roaring on the forums how much daniweb sucks and people are un responsive. That makes people not want to help you even more, because your acting like a girl. Second, you need some kind of code to help you or a really good example. People cant see your page. Third, people have lifes. Now i hope this helped.

fobos 19 Posting Whiz in Training

Try this.
just put this in the head with the other meta data.

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
fobos 19 Posting Whiz in Training

Please post your code

fobos 19 Posting Whiz in Training

Depending on what service your going to be using.. IE yahoo or anything else, there is a setting that needs to be set either in your php.ini or on the page itself. just google the smtp address and port number for the mail provider. sometimes you might have to provide a username and password for authentication.

if you want to run your own mail server, use maildemon. Hope this helps.

fobos 19 Posting Whiz in Training

Hello wonderland,
well first off nice site. Ok to get to your question, yes it is possible. Right now, you have the images in an iframe, but the main content is is on the page, so when you click on a link, it just reloads the page and the iframe as well. One thing you might try is putting your site into frames or just do the opposite of what you have now. So maybe something like

<table>
    <tr>
        <td>..the slide show</td>
    </tr>
    <tr>
        <td><iframe src="maincontent.htm"></iframe></td>
    </tr>
</table>

Then for any page in the iframe that has links, just use this.

<script type="javascript">
function go(url) {
    location.href = url;
}
</script>
<a onClick="javascript:go('maincontent.htm')>Home</a>

this way it will only reload the iframe with the next page and not the whole site. This is just a suggestion, let me know if this works for you.

fobos 19 Posting Whiz in Training

Wow thanks alot guys. This really helps to me to have a better understanding. Again thanks.

fobos 19 Posting Whiz in Training

Hello CF coders,
I am new to coldfusion and it seems very nice to use. I used to be a PHP coder, but then switch last week because i like some of the things that CF has to offer. I am currently using Coldfusion 9 with Dreamweaver CS5. The one question i had, was how to use and reference a CFFunction with a CFM document. I have read some stuff, but im still lost. I know im not supposed to do this, but can someone just show me how to implement a CFFunction? So lets say this is _component.cfc

<cfcomponent>
    <cffunction name="myFunction" access="public" returntype="string">
        <cfargument name="myArgument" type="string" required="yes">
        <cfset myResult="foo">
        <cfreturn myResult>
    </cffunction>
</cfcomponent>

Now what im lost is, if i have another page called _getcomponent.cfm, how do i call the function? Also, if i have an argument, does that mean that my function will look like this

<cfoutput>#myFunction('myArgument')#</cfoutput>

Im sorry, but again this is all new to me. Thanks for anyhelp that people my provide.

Fobos

fobos 19 Posting Whiz in Training

I had that same problem with searching between dates. here is what i used.

SELECT * FROM db.table WHERE ((date BETWEEN #CreateODBCDate(URL.from)# AND #CreateODBCDate(URL.to)#))

i used url because i was using a url to pass the variables and the "date" is in my database, so adjust to what you have for your date fields. i hope this helps at least.

fobos 19 Posting Whiz in Training

Good morning,
i know this was probably asked before, but im kinda in a jam. i have a database where it has a date field and a time field. i want to use a radio button to filter the fields. Say i have 3 radio buttons, the first one only filters last 24hrs, second one does 3 days and the 3rd one does a week. what is the SQL statement for this. im soo stuck. i dont need some long coding, just the SQL coding would be nice. thanks for any help.

Nevermind... remember the "BETWEEN" statement.. simple but mind twisting.

SELECT * FROM table WHERE field BETWEEN 'date or time' AND 'date or time'

fobos 19 Posting Whiz in Training

Hello all,
so im kinda stumped. Im a real big O'Riellys fan, so i came across one of tuts in PHP Cookbook. So basically i wanna display files in a folder or a directory using this code. The only problem is that when i load it in a page, it says: is not inside the document root. now i know this cause i have not specified anything in the "$dir", but even when i specify a folder, then ill get: foldername is not inside the document root. My "document root" is C:\xampp\htdocs . what could be the problem? i have tried alot.

<?php
define('S_IFMT',0170000);   // mask for all types 
define('S_IFSOCK',0140000); // type: socket 
define('S_IFLNK',0120000);  // type: symbolic link 
define('S_IFREG',0100000);  // type: regular file 
define('S_IFBLK',0060000);  // type: block device 
define('S_IFDIR',0040000);  // type: directory 
define('S_IFCHR',0020000);  // type: character device 
define('S_IFIFO',0010000);  // type: fifo 
define('S_ISUID',0004000);  // set-uid bit 
define('S_ISGID',0002000);  // set-gid bit 
define('S_ISVTX',0001000);  // sticky bit 
define('S_IRWXU',00700);    // mask for owner permissions 
define('S_IRUSR',00400);    // owner: read permission 
define('S_IWUSR',00200);    // owner: write permission 
define('S_IXUSR',00100);    // owner: execute permission 
define('S_IRWXG',00070);    // mask for group permissions 
define('S_IRGRP',00040);    // group: read permission 
define('S_IWGRP',00020);    // group: write permission 
define('S_IXGRP',00010);    // group: execute permission 
define('S_IRWXO',00007);    // mask for others permissions 
define('S_IROTH',00004);    // others: read permission 
define('S_IWOTH',00002);    // others: write permission 
define('S_IXOTH',00001);    // others: execute permission 

/* mode_string() is a helper function that takes an octal mode and returns
 * a ten character string representing the file type and permissions that
 * correspond to the octal mode. This is …
fobos 19 Posting Whiz in Training

Well if your sending it to a different page, where the data gets checked, they why dont you just use a form validator? that way you dont have to run into that problem?
Yes it is fine to have the page submit to itself. Does that answer your question? If your worried about something you could use stripslashes..

fobos 19 Posting Whiz in Training

Zagga, yes you can still use the method you are using now where you display the data on one page and analyze it on another. Using the back button, to go back to form after submit, never really works for analyzing the data. If im not mistaken, when you fix the errors, then you have to submit again.. right? which will add another entry to the database. If thats wrong, sorry. One thing that i do is have a form page, a display page, and an editing page. This, in my opinion, would be the easiest.
ex.. page1.php

<?php if(isset9$_POST['submit'])) {
// connection
// insert to db.. $sql = "INSERT INTO.."
   if(!mysql_query($sql,$con)) {
       die('ERROR: ' . mysql_error());
   } else {
       header("location:page2.php");
   }
} ?>
<head>
</head>
<body>
<form action='$_SERVER['PHP_SELF']' method='post'>
<input type='text' name='field1' />
<input type='submit' name='submit' value='Add' />
</form>
</body>

page2.php

<?php
//connection
//dislay database
// a link to call page3 using the id
<td>".$row['field1']."<a href='page3.php?id=".$row['id']."'>Update</a></td>
?>

page3.php

<?php
if(isset($_POST['change'])) {
//connection
mysql_query("UPDATE..SET.. WHERE id = '$_POST[id]'");
header("location:page2.php");
}
<head>
</head>
<body>
<?php
// connection
$sql = "SELECT * FROM table WHERE id = '$_GET[id]'";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
?>
<form action='<?php $_SERVER['PHP_SELF']?>' method='post'>
<input type='hidden' name='id' value='<?php echo $row['id'] ?>'>
//other form fields
<input type='submit' name='change' value='Update' />
</form>

Like i said, this always works for me.. i find it the most easiest. Also, you would need to empliment a session for login in order to see "update" when you are logged in. I hope …

fobos 19 Posting Whiz in Training

You must understand something when posting a forum. We are here to help, but you must show some code to let us know that you are trying. There are no freebies here, so expect handouts.

fobos 19 Posting Whiz in Training

Hi,
First off, a really good tutorial website would be www.w3schools.com. They have alot of different things you can learn. Thats where i got my email code. Most mail servers require a SMPT in order to find it, its like have a website but with no DNS lookup.
So a real simple one to start would be (from www.w3schools.com)

<?php
// i just googled these
ini_set("SMTP","pop3.mail.yahoo.com");
ini_set("smpt_port","995");
// if you need authorization
ini_set("smtp_username","username");
ini_set("smtp_password","password");
$to = "someone@example.com";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "someonelse@example.com";
$headers = "From: $from";
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
?>

I hope this helps out.

fobos 19 Posting Whiz in Training

You need to add values to your drop down boxes.
Before - <option>Cyprus</option>
After - <option value="Cyprus">Cyprus</option>
Now the value will get passed.. Hope this helps

I understand how to sent info e.g. emal address, but the problem is that I have radio buttons and select functions, so how do I tell the code, what was selected and needs to be posted to my email? What command I shout write? if you want to see website lint it is thsi one http://vo-services.com/subscribe.html

<select name="countryservices" id="countryservices" onclick="MM_effectHighlight(this, 1000, '#ffffff', '#BAD8E2', '#BAD8E2', false)">
                            <option>Cyprus</option>
                            <option>Singapore</option>
                            <option>Hong Kong</option>
                            <option>Vienna</option>
                            <option selected="selected">Bratislava</option>

                          </select>

</select>
fobos 19 Posting Whiz in Training

Hi,
well i have to ask, why would you want to have someone check a checkbox then have them enter something into a input box, then have the value be of the checkbox? Not scrutinizing or anything, because people have different ways of doing things.

fobos 19 Posting Whiz in Training

you could try using WHERE statement in your sql syntax..

$query = "SELECT firstname, lastname FROM swilregion132 WHERE onlineid = 'sessionname'" or die("Could not query mysql_query.");

This way its only pulling the information from that specific onlineid.
then u can use the rows for first and last name..
Hope this helps..

fobos 19 Posting Whiz in Training

you should use "if/else" statements..

<?php
if(isset($user) && (isset($pass)) { //whatever u want for this
    echo "<td><a href='www.something.com/file.htm'>Click</a><td>";
} else { 
    echo "<td>Click</td>";
}

Hope this helps..

fobos 19 Posting Whiz in Training

could you please show or provide a better example then just a one line request. Code is always helpful

fobos 19 Posting Whiz in Training

hello all,
i have a problem. First off, i am able to upload 200mb to mysql database; so im good there. I changed the values in "my.ini" to 700mb. The problem is, when i try to download it, i get a error 404 or something like that. Its like the file is too big to download? but, i can downloads smaller files..
ok some code...
Display results page....

echo "<a onclick=\"go('download.php?id=".$row['id']."');\">Something</a>";

and of course the javascript "go" is:

function go(url) {
        location.href = url;
}

download.php..

<?php
if(isset($_GET['id'])) 
{
// if id is set then get the file with the id from database

include 'library/config.php';
include 'library/opendb.php'; 
$id    = $_GET['id'];
$query = "SELECT name, type, size, content " .
         "FROM upload WHERE id = '$id'";

$result = mysql_query($query) or die('Error, query failed');
list($name, $type, $size, $content) = mysql_fetch_array($result);

header("Content-length: $size");
header("Content-type: $type");
header("Content-Disposition: attachment; filename=$name");
echo $content;

include 'library/closedb.php'; 
exit;
}

?>

So again, how can i increase my download limit?
Basically i got the whole code from PHP.MYSQL.TUTORIALS

fobos 19 Posting Whiz in Training

Hello all,
i am stuck on this.. i want to be able to play a video from a mysql database. Currently i can upload the video to mysql (name, type, size, content) and download the file. i have a media player that shows a video, but i have to use the <embed src"...location of file">
Basically this is what i am asking for.

User enters page... video plays current video. On the left side of video player, there are links of different videos. so if a user want to watch a video, he/she clicks on the link and watches that video.
i just dont know how to put the file together and get displayed on the embeded player.

So.. i click on link
info gets passed to php code.
php pulles file info from mysql (name, type, size, content);
php puts content together and displays on the video player.
i know its easier to store videos on a server and just upload the "url", but i want it to be played via mysql content. i really appreciate any comments or help.

fobos 19 Posting Whiz in Training

Thanks... it helped

fobos 19 Posting Whiz in Training

Hello,
im in a jam, i have tried to use count for my database to count a row, but i was wondering how to count individual things by name.
ex..
+++++++++++++++
+ id + name + color +
+++++++++++++++
+ 1 + joe + blue +
+ 2 + frank + red +
+ 3 + mike + black +
+ 4 + jack + black +
+++++++++++++++

no all i want to do is display a count for each color along instead of displaying 1 blue, 1 red, and 2 black. all i want to do is display black only.. so 2 black, and not the rest of the data? ive seen things, but dont help, like..

<?php
$query = ("SELECT name, count(color) FROM table");
$result = mysql_query($result)// blah blah blah
echo " ".$row['count(color)']."";
?>
i just want to display a single thing not all of them and how man. sorry if im confusing.
fobos 19 Posting Whiz in Training

Ok i found this, but i know its not PHP. I figured its something u can have in the mean time.

<SPAN ID="copytext" STYLE="height:150;width:162;background-color:pink">
This text will be copied onto the clipboard when you click the button below. Try it!
</SPAN> 
<TEXTAREA ID="holdtext" STYLE="display:none;">
</TEXTAREA>
<BUTTON onClick="ClipBoard();">Copy to Clipboard</BUTTON>

And the Javascript...

<SCRIPT LANGUAGE="JavaScript">

function ClipBoard() 
{
holdtext.innerText = copytext.innerText;
Copied = holdtext.createTextRange();
Copied.execCommand("Copy");
}

</SCRIPT>
fobos 19 Posting Whiz in Training

hello,
umm first off, w3schools teaches you things step by step, so you will only need the last php code, not all 3..lol.. second, what i would have done is when the user creates there profile, it would also create a folder in a directory where the folder would be called there username. this way, when the user logs in and uses the upload form, they would have there session going and u can use it to define the folder.

$user = $_SESSION['myusername'];
move_uploaded_file($_FILES["file"]["tmp_name"],
"$user/" . $_FILES["file"]["name"]);

But like i said, this is just a rough idea to get the ball rolling. i hope this helps

fobos 19 Posting Whiz in Training

its ok to have buttons in php. just name them different names. Then use the following coding for each button..

<?php
if(isset($_POST['name of button'])) {
// mysql code or php code
} ?>

does this help

fobos 19 Posting Whiz in Training

Ok just like i showed you where you can display it in text, now im gonna show you to put it into "<inputs>" ok?..
So this is what i first showed you...

<?php
mysql_connect("localhost","root","");
mysql_select_db("my_db");
$sql = "SELECT * FROM my_table WHERE id=$_GET[id]";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
?>
<table width="100%" border="0">
     <tr>
          <td>Name:</td>
          <td><?php echo ".$row['name']." ?></td>
     </tr>
     <tr>
          <td>Blah:</td>
          <td><?php ...blah?></td>
     </tr>
</table>

So, all this does it print out in plain text. Now im gonna add inputs.. We are gonna use the same coding structure, but add some stuff.

<body>
<?php 
// same mysql coding
?>
<form action="<?php $_SERVER['PHP_SELF'] ?>" method="post" enctype="multipart/form-data">
<?php echo "<input type="hidden" name="id" value="$row[id]">"; ?>
<table width="100%" border="0">
     <tr>
          <td>Name:</td>
          <td><?php echo "<input type='text' name='name' value='$row[name]'>"; ?></td>
     </tr>
     <tr>
          <td>Blah:</td>
          <td><?php ...blah?></td>
     </tr>
     <tr>
          <td width='60%' align='left'>
          <input type='submit' name='change' class='button' value='Change'></td>
     </tr>
</table>
</form>
</body>
//Now to use updating.
if(isset($_POST['change'])) {
$con = mysql_connect("localhost","root","");
if (!$con) {
     die('Could not connect: ' . mysql_error());
}
mysql_select_db("my_db", $con);
mysql_query("UPDATE my_table SET 
name = '$_POST[name]', blah = '$_POST[blah]' WHERE id = '$_POST[id]'");
}
?>
</html>

I really hope this works, if it doesnt i will strip down what i have and attach it as a file so u can see.

fobos 19 Posting Whiz in Training

Yeah, i will show you things, cause what your asking is what i already use. The thing is, im at work right now typing off my phone, so i will try to help after work..:yawn:

fobos 19 Posting Whiz in Training

Fileupload: Click Here

Email: Click Here

fobos 19 Posting Whiz in Training

Here this will help.. i use this in my code..
This list the users. so.. Users.php

<?php
mysql_connect("localhost","root","");
mysql_select_db("my_db");
$result = mysql_query("SELECT * FROM my_table");
while($row = mysql_fetch_array($result)) { echo"
<table width="100%" border="0">
     <tr>
          <td><a href='view_profile.php?id=".$row['id']."'>".$row['name']."</td>
     </tr>
</table>";
}
?>

And this the "view_profile.php". Basically when u click on the name, it passes the ID variable to the next page where you will use it to access the database.

<?php
mysql_connect("localhost","root","");
mysql_select_db("my_db");
$sql = "SELECT * FROM my_table WHERE id=$_GET[id]";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
?>
<table width="100%" border="0">
     <tr>
          <td>Name:</td>
          <td><?php echo ".$row['name']." ?></td>
     </tr>
     <tr>
          <td>Blah:</td>
          <td><?php ...blah?></td>
     </tr>
</table>

I like it this way, because now you can use HTML to build your stuff and then use a little bit of php code to access the rows.. I really hope this helps.

fobos 19 Posting Whiz in Training

yes there is a way, but its easier with javascript
the key is the "return confirm"

<form action="something.php" onSubmit="return confirm('Are you sure?');" method="post">
// Fields
// Fields
<input type="submit" name="Submit" class="button" value="Submit">
</form>

I hope this helps

fobos 19 Posting Whiz in Training

Try using $_GET[].
Ex..
say we are on the math training course, so it would be..
<a href="www.something.com/contact.php?course=math">Contact Us</a>

then on the contact form, just use the get function

$course = $_GET;
echo $course;

The only problem with that, is u have to manually add the link to all the pages. let me know if there is something else that you want

fobos 19 Posting Whiz in Training

This was posted on a previous thread.

<%
On Error Resume Next
Dim sConnection, objConn , objRS

sConnection = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=localhost; DATABASE=Your_Mysql_DB; UID=mysql_username;PASSWORD=mysql_password; OPTION=3"

Set objConn = Server.CreateObject("ADODB.Connection")

objConn.Open(sConnection) 
If Err.Number <> 0 Then
Response.Redirect "maintenance.asp"
Response.End
Else
'continue coding here
'...

objConn.close
Set objConn=Nothing
End If

%> 
Here is the link. http://www.daniweb.com/forums/thread246846.html
fobos 19 Posting Whiz in Training

Ok well there are a couple of ways to go about this, but im gonna show you one.
1.

<?php
$con = mysql_connect("server","username","password");
if (!$con) {
    die ('Could not connect!: ' . mysql_error());
}
mysql_select_db("db_name", $con);
$result = mysql_query("SELECT * FROM tablename"); <-- this is gonna be what ever you want. 
while ($row = mysql_fetch_array($result)) {
echo "<form action='update.php' method='post'>
<input type='text' name='id' value='$row[id]'><br> 
<input type='text' name='name' value='$row[name]'>... and so forth.
<input type='submit' name='submit'>
</form>";
}
mysql_close($con);
?>

2. update.php

$con = mysql_connect("server","username","password");
if (!$con) {
    die ('Could not connect!: ' . mysql_error());
}
mysql_select_db("db_name", $con);
mysql_query("UPDATE tablename SET name = '$_POST[name]' WHERE id = '$_POST[id]'");
?>

If you really want to learn, go to http://www.w3schools.com/. Im not gonna do the work for you, but ill just give you an idea.

fobos 19 Posting Whiz in Training

What u could do is, have the main page with navigaton links up top then have an iframe below the navigation bar.

Ex...
Web address bar.. www.something.com

<body>
Nav bar --> Home | Something | Something 2

Iframe --> <iframe></iframe>

this way, when someone clicks on "Something" it gets loaded into the iframe, rather than changing the whole page to www.something.com/Something.php.