fobos 19 Posting Whiz in Training

maybe something like

function showtip(id) {
    $(id).css "visibility" : "visible";    
}
function hidetip(id) {
    $(id).css "visibility" : "hidden";    
}

then add this to your href:

<a href='#' onmouseover='showtip('".row['id']."')' onmouseout='hidetip('".row['id']."')'>description</a>
<div id='".row['id']."'><?php echo $row['description'];?>   </div>

i think onmouseover='' and onmouseout='' needs to have javascript: in it. like onmouseout='javascript:hidetip()'. i hope this helps

fobos 19 Posting Whiz in Training

Well you go results with your code, until you used mine. Here is yours that worked, just took out the alerts.

<script type="text/javascript">
function showUser(str)	{
var xmlhttp; // You forgot to add this.
var1 = document.getElementById("users").value;
if (var1=="")	{
	document.getElementById("txtHint").innerHTML="";
	return;
}

if (window.XMLHttpRequest)	{
// code for IE7+, Firefox, Chrome, Opera, Safari
	xmlhttp=new XMLHttpRequest();
}

else	{// code for IE6, IE5
	xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}

xmlhttp.onreadystatechange=function()	{
	if (xmlhttp.readyState==4 && xmlhttp.status==200)	{
		document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
	}
}

xmlhttp.open("GET","getuser.php?q="+str,true);
xmlhttp.send();
}
</script>
fobos 19 Posting Whiz in Training

change var1 to user that way its not being confused as a variable like xmlhttp

var1 = document.getElementById("users").value;
to 
user = document.getElementById("users").value;
and change
if(var1==""){
to
if(user==""){
and change
xmlhttp.open("GET","getuser.php?q="+var1,true);
to
xmlhttp.open("GET","getuser.php?q="+user,true);
fobos 19 Posting Whiz in Training

did you use this one?

//try putting in an alert in the beginning.
<script type="text/javascript">
function showUser() {
    var xmlhttp; // You forgot to add this.
    var1 = document.getElementById("users").value;
    if(var1==""){
        document.getElementById("txtHint").innerHTML = "";
        return false;
    }
    if (window.XMLHttpRequest) {
        // code for IE7+, Firefox, Chrome, Opera, Safari
        xmlhttp=new XMLHttpRequest();
    } else {
        // code for IE6, IE5
        xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
    xmlhttp.onreadystatechange=function() {
        if (xmlhttp.readyState==4 && xmlhttp.status==200) (
            document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
        }
    }
    xmlhttp.open("GET","getuser.php?q="+var1,true);
    xmlhttp.send();
}
</script>

with this

<select name="users" id="users" onchange="showUser()">
fobos 19 Posting Whiz in Training

try this

<?php
$userinput = "hi.wmv";
echo '<a href="showvideo.php?video=', urlencode($userinput), '">';
?>
fobos 19 Posting Whiz in Training

Ajax is not an installation.
AJAX is based on internet standards, and uses a combination of:
-XMLHttpRequest object (to exchange data asynchronously with a server)
-JavaScript/DOM (to display/interact with the information)
-CSS (to style the data)
-XML (often used as the format for transferring data)

AJAX applications are browser- and platform-independent!

fobos 19 Posting Whiz in Training

lol thats because you have the 2 alerts in there.

function showUser(str) {
    var xmlhttp; // You forgot to add this.
    // Take out
    var1 = document.getElementById("users").value;
    alert(var1);  
    if (str=="")	{	
        document.getElementById("txtHint").innerHTML="";	
        return;
    } 
// Alert
alert(str);// Take this out also.

Now it should be fine.

fobos 19 Posting Whiz in Training

No problem man. there was an update on my thread with a couple of things. 1) you needed to add the var xmlttp, so i did that in the second to last code block. Also, added the select code block. So does it work now?

fobos 19 Posting Whiz in Training

Ok, well 2 things that you need to try for me. We are going to do some error checking.
On your php page that gets called, instead of

$q  = $_GET['q'];

Try puutting a number in its place and run the page by its self.

$q = "1";

If that works, then we will move on to the javascript. If not, then redo your query statement and re run the statement with the same code from above.

/* Old */
$sql="SELECT * FROM table WHERE id = '".$q."'";
/* New */
$sql="SELECT * FROM table WHERE id = '$q'";

Now the javascript.

//try putting in an alert in the beginning.
<script type="text/javascript">
function showUser(str) {
    if (str=="") {
        document.getElementById("txtHint").innerHTML="";
        return;
    }
    // Alert
    alert(str);
    if (window.XMLHttpRequest) {
        // code for IE7+, Firefox, Chrome, Opera, Safari
        xmlhttp=new XMLHttpRequest();
    } else {
        // code for IE6, IE5
        xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
    xmlhttp.onreadystatechange=function() {
        if (xmlhttp.readyState==4 && xmlhttp.status==200) (
            document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
        }
    }
    xmlhttp.open("GET","getuser.php?q="+str,true);
    xmlhttp.send();
}
</script>

if the string doesnt get passed, try this.

//try putting in an alert in the beginning.
<script type="text/javascript">
function showUser() {
    var xmlhttp; // You forgot to add this.
    var1 = document.getElementById("users").value;
    alert(var1);
    if(var1==""){
        document.getElementById("txtHint").innerHTML = "";
        return false;
    }
    if (window.XMLHttpRequest) {
        // code for IE7+, Firefox, Chrome, Opera, Safari
        xmlhttp=new XMLHttpRequest();
    } else {
        // code for IE6, IE5
        xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
    xmlhttp.onreadystatechange=function() {
        if (xmlhttp.readyState==4 && xmlhttp.status==200) (
            document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
        }
    }
    xmlhttp.open("GET","getuser.php?q="+str,true);
    xmlhttp.send();
}
</script>

Make sure you add …

fobos 19 Posting Whiz in Training

on line 7 you have

mysql_select_db("pras2");

you need to include the connection in it

mysql_select_db("pras2", $con);
fobos 19 Posting Whiz in Training

try this

<script type="text/javscript">
function show(var1, var2) {
    alert("I can count: " +var1+" "+var2);
}
</script>
<a onclick="show('Hey','Whats up')">click</a> 
or 
<a onclick="show('1','2')">click</a>
fobos 19 Posting Whiz in Training

dont use quotes in your function. do you even understand this or did you just copy the code and now you want people to solve it for you?

name is a variable. so if you have a function like

<a href="javascript:viewrestaurants(2)">view</a>

the 2 would be passed to the function viewrestaurants(int) because the function requires a variable which in this case is int or name or whatever you want it to be.

fobos 19 Posting Whiz in Training

lol fabos..

fobos 19 Posting Whiz in Training

Do you just need more variables in your function?

fobos 19 Posting Whiz in Training

Im not doing the work for you. I only helped you out on what you needed.

I am trying to make a function like this but i need the parameters to be a string

just apply it to your code

fobos 19 Posting Whiz in Training

mark solved and rep points

fobos 19 Posting Whiz in Training

TCPDF does not have physical limitations. You have to increase the memory in your php.ini

fobos 19 Posting Whiz in Training

Awwww no rep points

fobos 19 Posting Whiz in Training

I noticed that when they have mulitple variables that are being entered, the second variable has a . in front of the variable.
so
$message = ''
$message .='they the second one'

Try this:

while ($row = mysql_fetch_array($result, MYSQL_ASSOC))	{ 			
    $blog = $row['blogs'];				
    $site = $row['site'];				
    $rank = $row['rank']; 				
    $message .= '
    <tr>					
        <td>$blog</td>
        <td>$site</td>					
        <td>$rank</td>				
    </tr>';			
}	 			
$message .= '				
</table>				
</body>				
</html>';
fobos 19 Posting Whiz in Training

Try this

$message = '
<html>
<head>
  <title>Birthday Reminders for August</title>
</head>
<body>
  <p>Here are the birthdays upcoming in August!</p>
  <table>
    <tr>
      <th>Person</th><th>Day</th><th>Month</th>
    </tr>';

    //Connection    
    $query = "SELECT * From database	ORDER by columna";
    result = mysql_query($query) or die(mysql_error());    
    while ($row = mysql_fetch_array($result))	{
    $message = '
    <tr>
      <td>".$row['a']."</td><td>".$row['b']."</td><td>".$row['c']."</td>
    </tr>';
    }
$message = '
 </table>
</body>
</html>
';
fobos 19 Posting Whiz in Training

If you are able to succesfully store the link and display the link in text, then just use onmouseover to call the function.

fobos 19 Posting Whiz in Training
<?php
if(isset($_POST['send']))	{
    //Connection
    $email = $_POST['email'];
    $query = "SELECT * From database	ORDER by columna";
    $result = mysql_query($query) or die(mysql_error());
    while ($row = mysql_fetch_array($result))	{ 		
        $A = $row['a'];		
        $B = $row['b'];		
        $C = $row['c']; 
    }	

    $to = $email;
    $subject = "Data";
    $message = "$A\n $B\n $C\n";
    $from = "someonelse@example.com";
    $headers = "From:" . $from;
    mail($to,$subject,$message,$headers);
    echo "Mail Sent.";
}
?>

if your still having problems emailing, then you need to configure your email
http://www.w3schools.com/php/php_ref_mail.asp

fobos 19 Posting Whiz in Training

Are you still havig problems?? If not, MARK THE THREAD SOLVED!!!

fobos 19 Posting Whiz in Training

pritaeas is right. But if you want to change it from 'int' to something else, you have to change it in the AJAX function

function viewrestaurant(int){if (window.XMLHttpRequest)

and here to reflect:

viewrestaurant.php?viewr="+int
fobos 19 Posting Whiz in Training

You could use PHP, coldfusion, or AJAX. Then decide if you want to use div's or tables. Hope this helps

fobos 19 Posting Whiz in Training

are you using <a href="javascript:" or onClick=""...?

fobos 19 Posting Whiz in Training

Can you show your code so far, this way we can help out. Right now, we have to imagine what you are trying to achieve and you may get wrong solutions.

fobos 19 Posting Whiz in Training

lol thanks for catching that.. my mistake

<form action="" method="post">	
    <fieldset> 		
    <select name="users" onchange="showUser(this.value)">	            
        <option value="">Select a Kinase:</option>
        <!-- RUN QUERY TO POPULATE DROP DOWN -->		
        <?php		
        $query = "SELECT * FROM kbaCalc ORDER by kinase"; 		
        $result = mysql_query($query) or die(mysql_error());		
        /*$num = mysql_num_rows($result);*/ 		
        while($row = mysql_fetch_array($result))	{ 			
            echo "<option value='".$row['id']."'>".$row['kinase']."</option>"; 
        } 
        ?> 	                           
    </select>                 
    <div id="txtHint">Stuff here!</div>          
    </fieldset>
</form>

I knew something was up..lol. Now, this will populate the option.

fobos 19 Posting Whiz in Training

From what i have learned in the past, #includes are like prebuilt function that you can use in your source code if you want to reference it. If you dont need it, then just take it out. Im just going off what you said:

My question is: why do we need to include ctime in this code and what is it good for?

I am sorry if there is a problem with your coding, because i will not be able to answer it. If there is a problem with your code, post what the problem is and what you are trying to achieve.

fobos 19 Posting Whiz in Training

change ID to id and see if that helps

fobos 19 Posting Whiz in Training

chrispadgham is correct.

fobos 19 Posting Whiz in Training

If that doesnt work, you can try XAMPP. Its a great package with everything.

fobos 19 Posting Whiz in Training

Also you can create a cache.
open my.ini and change the following:
set query_cache_type to 1,2,or3
query-cache-type = ?
settings: 0 (disable / off), 1 (enable / on) and 2 (on demand).
set query_cache_size to your expected size in MB
query-cache-size = 20M

To check if your mysql server already enable query cache, simply run this query:
SHOW VARIABLES LIKE ‘%query_cache%’;

To check if your MySQL query cache is working, simply perform a sql query for 2 times and check the query cache variable like below:
SHOW STATUS LIKE ‘%qcache%’;

For the first time you execute your SQL query, the time it should take take be longer compare to the second time query. This is due to the MySQL query cache is working!

fobos 19 Posting Whiz in Training
fobos 19 Posting Whiz in Training

If your not getting anythinng in the drop down box, try this.

You: //Changes are in RED

while($row = mysql_fetch_array($result)) { 			
    $kinase = $row['kinase'];			
    $tracer_conc = $row['tracer_conc']; 			
    $options.= "<option value='$id'>".$kinase; 
    // You do not have ID defined in $row..		
} 		
echo "</select>"; <-- Why is this here? 		
?>                 
<select name="users" onchange="showUser(this.value)">	            
<option value="">Select a Kinase:</option>	            
<?=$options?> // Never write in shorthand. Confuses with XML
</select>

New:

$row = mysql_fetch_array($result);			
$kinase = $row['kinase'];			
$tracer_conc = $row['tracer_conc']; 			
$options = "<option value='".$row['id']."'>$kinase</option>"; 					
?>                 
<select name="users" onchange="showUser(this.value)">	            
<option value="">Select a Kinase:</option>	            
<?php echo $options ?>
</select>

I changed while($row = mysql_fetch_array($result)) { to $row = mysql_fetch_array($result); because when you had it your way, that only queries in the curly brackets. The other way, you can pass variables thru out the page. If im wrong, sorry. This is what i always do. I hope this helps

fobos 19 Posting Whiz in Training

Are you able to echo username and password after the if($_SERVER["REQUEST_METHOD"] == "POST")?

fobos 19 Posting Whiz in Training

first off, you cannot put session_start() at the top of a login page, because there is no session yet. I would just take out $_SERVER["REQUEST_METHOD"] == "POST") unless you know that the variables are being posted. Try this because i have a feeling you got this from another website.. Also, you dont need to make a session variable on the login screen because you are already going to register the username. If you want to register more variables, then add them to the to session_register.

session_register("myusername");
session_register("mypassword"); 
// Dont Need
$_SESSION['login_user']=$myusername;
<?php
$host="localhost"; // Host name 
$username=""; // Mysql username 
$password=""; // Mysql password 
$db_name="test"; // Database name 
$tbl_name="members"; // Table name 

// Connect to server and select databse.
mysql_connect("$host", "$username", "$password")or die("cannot connect"); 
mysql_select_db("$db_name")or die("cannot select DB");

// username and password sent from form 
$myusername=$_POST['myusername']; 
$mypassword=$_POST['mypassword']; 

// To protect MySQL injection (more detail about MySQL injection)
$myusername = stripslashes($myusername);
$mypassword = stripslashes($mypassword);
$myusername = mysql_real_escape_string($myusername);
$mypassword = mysql_real_escape_string($mypassword);

$sql="SELECT * FROM $tbl_name WHERE username='$myusername' and password='$mypassword'";
$result=mysql_query($sql);

// Mysql_num_row is counting table row
$count=mysql_num_rows($result);

// If result matched $myusername and $mypassword, table row must be 1 row
if($count==1){
// Register $myusername, $mypassword and redirect to file "login_success.php"
session_register("myusername");
session_register("mypassword"); 
session_register("active");
header("location:login_success.php");
}
else {
echo "Wrong Username or Password";
}
?>
fobos 19 Posting Whiz in Training

this is from phpeasystep.com

<?php
$host="localhost"; // Host name 
$username=""; // Mysql username 
$password=""; // Mysql password 
$db_name="test"; // Database name 
$tbl_name="members"; // Table name 

// Connect to server and select databse.
mysql_connect("$host", "$username", "$password")or die("cannot connect"); 
mysql_select_db("$db_name")or die("cannot select DB");

// username and password sent from form 
$myusername=$_POST['myusername']; 
$mypassword=$_POST['mypassword']; 

// To protect MySQL injection (more detail about MySQL injection)
$myusername = stripslashes($myusername);
$mypassword = stripslashes($mypassword);
$myusername = mysql_real_escape_string($myusername);
$mypassword = mysql_real_escape_string($mypassword);

$sql="SELECT * FROM $tbl_name WHERE username='$myusername' and password='$mypassword'";
$result=mysql_query($sql);

// Mysql_num_row is counting table row
$count=mysql_num_rows($result);
// If result matched $myusername and $mypassword, table row must be 1 row

if($count==1){
// Register $myusername, $mypassword and redirect to file "login_success.php"
session_register("myusername");
session_register("mypassword"); 
header("location:login_success.php");
}
else {
echo "Wrong Username or Password";
}
?>
fobos 19 Posting Whiz in Training

if you have a button in an iframe which is on your parent page, then you have to write a function that calls that xmlHttp.responseText on that parent page. Try this, on the iframe page that is being loaded, put

function loadpage(url) {
     parent.changepage(url);
}

parent page

function changepage(url){
document.getElementById("id").src = url;
}

This is to give you an example on how to call a javascript from your iframe to your parent page.

fobos 19 Posting Whiz in Training

do you have multiple classes named .alert?

fobos 19 Posting Whiz in Training

Is this something that people can use or a problem?

fobos 19 Posting Whiz in Training

can you show your code?

fobos 19 Posting Whiz in Training

Just do what pritaeas said

fobos 19 Posting Whiz in Training

If you open your databse, are all the dates 1970 00:00:00? Can you post more code then what you posted. Its kinda hard from just seeing a fragment of what you have.

fobos 19 Posting Whiz in Training

i read on another forum that they removed the define('DB_CHARSET', 'UTF8'); from there page and it worked.

http://wordpress.org/support/topic/multilanguage-blog-icelandic-japanese-english-spanish

fobos 19 Posting Whiz in Training

Try using this website. He has a O'Reilly CD Library.

Here

In my opinion, O'Reilly and Lynda.com are really good to learn from.

fobos 19 Posting Whiz in Training

try using
window.location.href = 'Add_New_Project.php?project_name=' + project_name + '&cat=' + val + '&prj_desc=' + project_desc;

fobos 19 Posting Whiz in Training
fobos 19 Posting Whiz in Training

Try this:

<script type="text/javascript">
function abc() {
    <?php
    //Connection
    $search = mysql_query("SELECT lab_credit_hr FROM courses WHERE course_number = '$_GET['course']'");
    $row = mysql_fetch_array($search);
    if($row['lab_credit_hr'] == 0) {
        echo "document.getElementById('id').disabled = true;";
    } else {
        echo "document.getElemenbById('id').disabled = false;";
    }
    ?>
}
</script>

I hope this helps. This is untested

fobos 19 Posting Whiz in Training

Try this

<?php
$host="localhost"; // Host name 
$username=""; // Mysql username 
$password=""; // Mysql password 
$db_name="test"; // Database name 
$tbl_name="members"; // Table name 

// Connect to server and select databse.
mysql_connect("$host", "$username", "$password")or die("cannot connect"); 
mysql_select_db("$db_name")or die("cannot select DB");

// username and password sent from form 
$myusername=$_POST['myusername']; 
$mypassword=$_POST['mypassword']; 

// To protect MySQL injection (more detail about MySQL injection)
$myusername = stripslashes($myusername);
$mypassword = stripslashes($mypassword);
$myusername = mysql_real_escape_string($myusername);
$mypassword = mysql_real_escape_string($mypassword);

$sql="SELECT * FROM $tbl_name WHERE username='$myusername' and password='$mypassword'";
$result=mysql_query($sql);

// Mysql_num_row is counting table row
$count=mysql_num_rows($result);
// If result matched $myusername and $mypassword, table row must be 1 row

if($count==1){
// Register $myusername, $mypassword and redirect to file "login_success.php"
session_register("myusername");
session_register("mypassword"); 
session_start();
if(!session_is_registered(myusername)){
header("location:main_page.php");
}
}
else {
echo "Wrong Username or Password";
}
?>

Then put this at the top of each page;
session_start();
$username = $_SESSION;
$password = $_SESSION;

-==Zero==- commented: You Are Awesome Thanks +3