j_limboo 0 Junior Poster in Training

I am newbee to javascript

wanted help!
I have google, yahoo, bing results to open in a frame without my domain name changing. The results for the query is shown in iframe. The results can be anything any domain. I am trying to see if javascript between those open and close head can do any magic.

Click on any results to query on iframe it should open in new window.

Again the results can be any domain

Here is the sample of the code

<html>
<head>
</head>
<body>
<form name="jksearch" action="http://www.google.com/search" method="get" onSubmit="jksitesearch(this)" target="iFrame2">

<b><p>Search Resumes in Google and Bing</p> </b><br />
<input id="hiddenquery" type="hidden" name="q" />
<input name="qfront" type="text" style="width: 200px" value="Search Resumes" />
<br />
<div style="font: bold 11px Verdana;">Google:<input name="se" type="radio" checked>  Bing:<input name="se" type="radio">
<br/>
<br/>
  

  <input type="submit" value="Search" />
</form>

<br/>
<br/>
<br/>

<?php
echo '<input type="button" value="Back To Results" onClick="history.go(-1);">';
echo "<br/>";
echo "<br/>";
echo '<input type="button" value="Previous Resume" onClick="history.go(1);">';
echo "<br/>";
?>


<script type="text/javascript">

var eliminate2="-jobs -apply -sample"
var type="(resume OR cv OR vitae)" 
var file4="(filetype:pdf OR filetype:doc OR filetype:rtf)"
var con2="(phone OR email OR cell OR home OR mobile)" 



var searchaction=[ //form action for the 2 search engines
"http://www.google.com/search",
"http://www.bing.com/search?q=",
]

var queryfieldname=["q","q"] //name of hidden query form for the 3 search engines

function switchaction(cur, index){
cur.form.action=searchaction[index]
document.getElementById("hiddenquery").name=queryfieldname[index]
}

function jksitesearch(curobj){
for (i=0; i< document.jksearch.se.length; i++){ //loop through radio to see which is checked
if (document.jksearch.se[i].checked==true)
switchaction(document.jksearch.se[i], i)
}
document.getElementById("hiddenquery").value=file4+" …
j_limboo 0 Junior Poster in Training

That adds sense
thank you

j_limboo 0 Junior Poster in Training

network18 did it as you described. Kaion was also right but that again need to integrate in the application. For now it was short and sweet like network18 adviced me

Thank you all

j_limboo 0 Junior Poster in Training

Lately I have learnt many things from Daniweb specially on PHP and mysql.
I am building a HR application where I was looking for visitor to leave a message and which should redirect to admin or who ever is responsible

Any suggestions is greatly appreciated

j_limboo 0 Junior Poster in Training

Did some changes to the code which i was doing wrong and made it work
its working!

$server="xxxx";
$db_user="xxxx";
$db_pass="xxxx";
$database="xxxx";
// connect to the mysql server
$link = mysql_connect($server, $db_user, $db_pass)
or die ("Could not connect to mysql because ".mysql_error());

// select the database
mysql_select_db($database)
or die ("Could not select database because ".mysql_error());

$rs_pwd = mysql_query("select password FROM users where username='$_POST[username]'");
list($old) = mysql_fetch_row($rs_pwd);

	if($old == sha1($_POST['password']))
	{
	$newmd5 = sha1(mysql_real_escape_string($_POST['newpassword']));
	mysql_query("update sumo_users set password='$newmd5' where username='$_POST[username]'");
echo "Password Changed successfully";
	} else
	{
	echo "Password change failed";
	}
	
	
	?>
j_limboo 0 Junior Poster in Training

Hi newbee to php mysql
appreciate if anyone can help in change password in sha1
Current mysql table

`users` (
  `id` int(255) unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(100) NOT NULL,
  `firstname` varchar(50) DEFAULT NULL,
  `lastname` varchar(50) DEFAULT NULL,
  `password` varchar(40) NOT NULL,
  `active` int(1) NOT NULL DEFAULT '0',
  `ip` text NOT NULL,
  `usergroup` text NOT NULL,
  `datasource_id` int(3) unsigned DEFAULT '0',
  `last_login` int(14) DEFAULT NULL,
  `day_limit` int(3) unsigned DEFAULT NULL,
  `language` varchar(5) NOT NULL DEFAULT 'en',
  `email` varchar(100) DEFAULT NULL,
  `pwd_updated` int(14) unsigned DEFAULT NULL,
  `created` int(14) unsigned NOT NULL DEFAULT '0',
  `owner_id` int(255) NOT NULL DEFAULT '0',
  `modified` int(14) unsigned DEFAULT NULL,
  `updated` int(14) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `login` (`username`),
  KEY `active` (`active`),
  KEY `password` (`password`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=11 ;
j_limboo 0 Junior Poster in Training

Let me check this

j_limboo 0 Junior Poster in Training
Newbee in php
Below is my table and script, I know it should change the password
I am using a registration application
the password is saved in this manner
1d7d2fcc49f157c0be4456580011a58d469c71b6
I could not make out if this is a md5.
I echoed the php, the password i type in the form, it shows different.
now you must be thinking i typed the wrong password
I can login to the web application with the password but using the same password i cannot change
Please advice

 
`users` (
  `id` int(255) unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(100) NOT NULL,
  `firstname` varchar(50) DEFAULT NULL,
  `lastname` varchar(50) DEFAULT NULL,
  `password` varchar(40) NOT NULL,
  `active` int(1) NOT NULL DEFAULT '0',
  `ip` text NOT NULL,
  `usergroup` text NOT NULL,
  `datasource_id` int(3) unsigned DEFAULT '0',
  `last_login` int(14) DEFAULT NULL,
  `day_limit` int(3) unsigned DEFAULT NULL,
  `language` varchar(5) NOT NULL DEFAULT 'en',
  `email` varchar(100) DEFAULT NULL,
  `pwd_updated` int(14) unsigned DEFAULT NULL,
  `created` int(14) unsigned NOT NULL DEFAULT '0',
  `owner_id` int(255) NOT NULL DEFAULT '0',
  `modified` int(14) unsigned DEFAULT NULL,
  `updated` int(14) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `login` (`username`),
  KEY `active` (`active`),
  KEY `password` (`password`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;




/*
<?
$host="localhost";          // Host name 
$username="root";        // Mysql username 
$password="brijpuja1"; // Mysql password 
$db_name="newsumo";  // Database name 
$tbl_name="users";     // Table name 

$username=$_POST['username'];
$oldpass=$_POST['oldpass']; 
$newpass=$_POST['newpass']; 
$conpass=$_POST['confirmpass'];

$encry_oldpass=md5($oldpass);          //encrypting old password
echo "$encry_oldpass";

/*  Test OK
echo $username;
echo "<br />";
echo $oldpass;
echo "<br />";
echo $encry_oldpass;
echo "<br />";
die();   */

$con=mysql_connect("$host","$username","$password");
mysql_select_db("$db_name",$con);

$result=mysql_query("SELECT * FROM …
j_limboo 0 Junior Poster in Training

I echo the old md5 password and it does not match the password in the database.
The registration application is using a different encryption
1d7d2fcc49f157c0be4456580011a58d469c71b6 using password brijpuja

md5 looks d41d8cd98f00b204e9800998ecf8427e using password brijpuja

j_limboo 0 Junior Poster in Training

And also methods to Preventing multiple Login, I mean Preventing account fraud
The Login, Protect page.

j_limboo 0 Junior Poster in Training

I just echoed md5 old password is correct but the echo md5 is different from database that means the registration form does nt save password in md5

Here is the look of the password saved in the database can anyone tell what type is it

1d7d2fcc49f157c0be4456580011a58d469c71b6
Please advice

j_limboo 0 Junior Poster in Training

the registration application saves password in this way. is it md5 at all
1d7d2fcc49f157c0be4456580011a58d469c71b6

j_limboo 0 Junior Poster in Training

Now I get this
no errors
Password Change Fails

j_limboo 0 Junior Poster in Training

nadnakinam
I get this error

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'joelimboo'@'localhost' (using password: YES) in D:\webroot\puresearch\passch.php on line 37

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in D:\webroot\puresearch\passch.php on line 38

Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in D:\webroot\puresearch\passch.php on line 40

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in D:\webroot\puresearch\passch.php on line 40

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in D:\webroot\puresearch\passch.php on line 41
Password Change Fails

my html code

<h1>Change Password</h1>
  <form method="POST" action="passch.php"><br/>

         Enter your UserName
      <input type="username" size="10" name="username"> <br/>
      
      Enter your existing password:
    <input type="password" size="10" name="oldpass"><br/>
Enter your new password:
      <input type="password" size="10" name="newpass"><br/>
      Enter your new password:
   <input type="password" size="10" name="confirmpass"><br/>


<input type="submit" value="Update Password">
  </form>

passch.php

<?php


$host="localhost";          // Host name 
$username="root";        // Mysql username 
$password="brijpuja1"; // Mysql password 
$db_name="puresearch";  // Database name 
$tbl_name="sumo_users";     // Table name 

$username=$_POST['username'];
$oldpass=$_POST['oldpass']; 
$newpass=$_POST['newpass']; 
$conpass=$_POST['confirmpass'];

$encry_oldpass=md5($oldpass);          //encrypting old password

/*  Test OK
echo $username;
echo "<br />";
echo $oldpass;
echo "<br />";
echo $encry_oldpass;
echo "<br />";
die();   */

$con=mysql_connect("$host","$username","$password");
mysql_select_db("$db_name",$con);

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

if((!empty($newpass)&&!empty($conpass))&&($newpass==$conpass)&&($count==1))
 {
      $encry_conpass=md5($conpass);//encrypting confirm password

      $result2=mysql_query("UPDATE $tbl_name SET password='$encry_conpass' WHERE username='$username' and password='$encry_oldpass'");
      
      echo "Password Chamged Successfully"; 
     // header("location:...............");	  // redirect to login page

 }
 else
 {
      echo"Password Change Fails";	 
     // header("location:...............");	  // redirect to password change page
 }
?>

my table row

`sumo_users` (
  `id` int(255) unsigned …
j_limboo 0 Junior Poster in Training

Still do not change after doing the above
Is it something to do with table

j_limboo 0 Junior Poster in Training

New to PHP
Password change fails please advice

CREATE TABLE IF NOT EXISTS `ps_users` (
  `id` int(255) unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(100) NOT NULL,
  `firstname` varchar(50) DEFAULT NULL,
  `lastname` varchar(50) DEFAULT NULL,
  `password` varchar(40) NOT NULL,
  `active` int(1) NOT NULL DEFAULT '0',
  `ip` text NOT NULL,
  `usergroup` text NOT NULL,
  `datasource_id` int(3) unsigned DEFAULT '0',
  `last_login` int(14) DEFAULT NULL,
  `day_limit` int(3) unsigned DEFAULT NULL,
  `language` varchar(5) NOT NULL DEFAULT 'en',
  `email` varchar(100) DEFAULT NULL,
  `pwd_updated` int(14) unsigned DEFAULT NULL,
  `created` int(14) unsigned NOT NULL DEFAULT '0',
  `owner_id` int(255) NOT NULL DEFAULT '0',
  `modified` int(14) unsigned DEFAULT NULL,
  `updated` int(14) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `login` (`username`),
  KEY `active` (`active`),
  KEY `password` (`password`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=11 ;
<html>
<head>
</head>
<body bgcolor="#5791BF">
  <h1>Change Password</h1>
  <form method="POST" action="passch.php">
  <table>
    <tr>
          <td>Enter your UserName</td>
      <td><input type="username" size="10" name="username"></td>
      
      <td>Enter your existing password:</td>
      <td><input type="password" size="10" name="password"></td>
    </tr>
    <tr>
      <td>Enter your new password:</td>
      <td><input type="password" size="10" name="newpassword"></td>
    </tr>
    
  </table>
  <p><input type="submit" value="Update Password">
  </form>
  <p><a href="member-index.php">Home</a>
  <p><a href="logout.php">Logout</a>
</body>
</html>

<?php
$server="localhost";
$db_user="root";
$db_pass="brijpuja1";
$database="puresearch";
// connect to the mysql server
$link = mysql_connect($server, $db_user, $db_pass)
or die ("Could not connect to mysql because ".mysql_error());

// select the database
mysql_select_db($database)
or die ("Could not select database because ".mysql_error());

$rs_pwd = mysql_query("select password FROM ps_users where username='$_POST[username]'");
list($old) = mysql_fetch_row($rs_pwd);

	if($old == md5($_POST['password']))
	{
	$newmd5 = md5(mysql_real_escape_string($_POST['newpassword']));
	mysql_query("update ps_users set password='$newmd5' where username='$_POST[username]'");
echo "Password Changed successfully";
	} else
	{
	echo "Password change failed";
	}
	
	
	?>
j_limboo 0 Junior Poster in Training

the links provided has 3 tables id username and password
the code does not write session in db
cannot check where a user has loggedin
any other suggestions plz

j_limboo 0 Junior Poster in Training

New to php
I want to create new table and store session ID
this step is to prevent multiple login
Current using this code which does not check multiple logins
Any advice would be appreciated

<?php
	//Start session
	session_start();
	
	//Include database connection details
	require_once('config.php');
	
	//Array to store validation errors
	$errmsg_arr = array();
	
	//Validation error flag
	$errflag = false;
	
	//Connect to mysql server
	$link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
	if(!$link) {
		die('Failed to connect to server: ' . mysql_error());
	}
	
	//Select database
	$db = mysql_select_db(DB_DATABASE);
	if(!$db) {
		die("Unable to select database");
	}
	
	//Function to sanitize values received from the form. Prevents SQL injection
	function clean($str) {
		$str = @trim($str);
		if(get_magic_quotes_gpc()) {
			$str = stripslashes($str);
		}
		return mysql_real_escape_string($str);
	}
	
	//Sanitize the POST values
	$login = clean($_POST['login']);
	$password = clean($_POST['password']);
	
	//Input Validations
	if($login == '') {
		$errmsg_arr[] = 'Login ID missing';
		$errflag = true;
	}
	if($password == '') {
		$errmsg_arr[] = 'Password missing';
		$errflag = true;
	}
	
	//If there are input validations, redirect back to the login form
	if($errflag) {
		$_SESSION['ERRMSG_ARR'] = $errmsg_arr;
		session_write_close();
		header("location: login-form.php");
		exit();
	}
	
	//Create query
	$qry="SELECT * FROM members WHERE login='$login' AND passwd='".md5($_POST['password'])."'";
	$result=mysql_query($qry);
	
	//Check whether the query was successful or not
	if($result) {
		if(mysql_num_rows($result) == 1) {
			//Login Successful
			session_regenerate_id();
			$member = mysql_fetch_assoc($result);
			$_SESSION['SESS_MEMBER_ID'] = $member['member_id'];
			$_SESSION['SESS_FIRST_NAME'] = $member['firstname'];
			$_SESSION['SESS_LAST_NAME'] = $member['lastname'];
			session_write_close();
			header("location: member-index.php");
			exit();
		}else {
			//Login failed
			header("location: login-failed.php");
			exit();
		}
	}else {
		die("Query failed");
	}
?>
j_limboo 0 Junior Poster in Training

lets take this code to the next level

j_limboo 0 Junior Poster in Training

what lines and tables need to be added to prevent multiple logins

j_limboo 0 Junior Poster in Training

does the above code prevents multiple login

j_limboo 0 Junior Poster in Training

multiple login issue with the same username and password

j_limboo 0 Junior Poster in Training

I was looking for 1 user account, 1 login. If the owner of the user shares the account still 1 should login at anytime.
There should be no chance two client logging in with the same username at the same time

j_limboo 0 Junior Poster in Training

Please advice once the session is created by A client and B client logs in with the same username and password I want to logout A client
Is this possible?

<?php
	//Start session
	session_start();
	
	//Check whether the session variable SESS_MEMBER_ID is present or not
	if(!isset($_SESSION['SESS_MEMBER_ID']) || (trim($_SESSION['SESS_MEMBER_ID']) == '')) {
		header("location: access-denied.php");
		exit();
	}
?>
j_limboo 0 Junior Poster in Training

New to javascript

I was looking for a help

I have a web application where it does not accept double quotes, If the user inputs " (double quotes) it should prompt that double quotes are invalid and instead use ' single quotes
Any advice would be helpful

j_limboo 0 Junior Poster in Training

Solved it Myself

Thanks!

j_limboo 0 Junior Poster in Training

While creating a userid the password is saved in type md5 in mysql
The below script to change password does not save password in md5 in mysql
and hence user after changing password cannot login
The script also gives password chaged sucessfully but also says you have typed wrong password (the old one)
as users type their password in the form which are not in type md5

is there any solution for this

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                      "http://www.w3.org/TR/html401/loose.dtd">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <title>Password Change</title>
</head>
<body>
  <h1>Change Password for {USERNAME}</h1>
  {MESSAGE}
  <form method="POST" action="passch.php">
  <table>
    <tr>
          <td>Enter your UserName</td>
      <td><input type="username" size="10" name="username"></td>
      
      <td>Enter your existing password:</td>
      <td><input type="password" size="10" name="password"></td>
    </tr>
    <tr>
      <td>Enter your new password:</td>
      <td><input type="password" size="10" name="newpassword"></td>
    </tr>
    <tr>
      <td>Re-enter your new password:</td>
      <td><input type="password" size="10" name="confirmnewpassword"></td>
    </tr>
  </table>
  <p><input type="submit" value="Update Password">
  </form>
  <p><a href="home.php">Home</a>
  <p><a href="logout.php">Logout</a>
</body>
</html>

passch.php

<?php 

$server="xxxx";
$db_user="xxxx";
$db_pass="xxxx";
$database="xxxx";
// connect to the mysql server
$link = mysql_connect($server, $db_user, $db_pass)
or die ("Could not connect to mysql because ".mysql_error());

// select the database
mysql_select_db($database)
or die ("Could not select database because ".mysql_error());



$username = $_POST['username']; 
$password = $_POST['password']; 
$newpassword = $_POST['newpassword']; 
$confirmnewpassword = $_POST['confirmnewpassword']; 

$result = mysql_query("SELECT passwd FROM members WHERE login='$username'"); 
if(!$result)  
{  
echo "The username you entered does not exist";  
}  
else  
if($password!= mysql_result($result, 0))  
{  
echo "You entered an incorrect password";  
}  
if($newpassword=$confirmnewpassword)  
    $sql=mysql_query("UPDATE members SET passwd='$newpassword' where login='$username'");  
    if($sql)  
    {  
    echo "Congratulations You …
j_limboo 0 Junior Poster in Training

anyone have advice to it

here is what ii have for now
gives a snipp UI view
but not satisfactory
when i off the mouse it should go of, when i am typing it should remain

with the current code it still displays
i have tried onmouse
but on click it dissapears

here is the code
Please let me know the sophisticated way

<html>
<head>
<STYLE TYPE="text/css">

#menu1 { display : none }
#menu2 { display : none }
#menu3 { display : none }

A:link {color:black; text-decoration:none}
A:hover {color:blue; text-decoration:underline}

</STYLE> 

<Title> PureSearch </Title>
</head>
<Body bgcolor="#000000">
<SPAN onClick="document.all.menu1.style.display = 'block'"
onClick="document.all.menu1.style.display = 'block'">
<h2><p style="color:#FF3"> Search Resumes </p></h2>
</SPAN>


<form action="tst.php" method="GET">
<SPAN ID="menu1" onDblClick="document.all.menu1.style.display = 'none'">
<table bgcolor="#CB344F" cellpadding="0" cellspacing="0">
<tr>
<td>


Search By Skills: 
<input type="text" name="q" style="width:210px;">
<br/>
<p></p>


ZipCode: <input type="text" name="z" style="width:210px;"><br/>
<p></p>

                 <select name="state" style="width:210px">
                 <option value="">Search By Location</option>
  <option value="">Anywhere</option>
                        <option value="AL OR Alabama">Alabama</option>
                        <option value="AK OR Alaska">Alaska</option>
                        <option value="AR OR Arkansas">Arkansas</option>
                        <option value="AZ OR Arizona">Arizona</option>
                        <option value="CA OR California">California</option>
                        <option value="CO OR Colorado">Colorado</option>
                        <option value="CT OR Connecticut">Connecticut</option>
                        <option value="DE OR Delaware">Delaware</option>
                        <option value="FL OR Florida">Florida</option>
                        <option value="GA OR Georgia">Georgia</option>
                        <option value="HI OR Hawaii">Hawaii</option>
                        <option value="IA OR Iowa">Iowa</option>
                        <option value="ID OR Idaho">Idaho</option>
                        <option value="IL OR Illinois">Illinois</option>
                        <option value="IN OR Indiana">Indiana</option>
                        <option value="KS OR Kansas">Kansas</option>
                        <option value="KY OR Kentucky">Kentucky</option>
                        <option value="LA OR Louisiana">Louisiana</option>
                        <option value="MA OR Massachusetts">Massachusetts</option>
                        <option value="MD OR Maryland">Maryland</option>
                        <option value="ME OR Maine">Maine</option>
                        <option value="MI OR Michigan">Michigan</option>
                        <option value="MN OR …
j_limboo 0 Junior Poster in Training

will let you know when i integrate Will do it tommorow and will you know how it goes

j_limboo 0 Junior Poster in Training

Hi need help the search information has to be in Snippet in the UI
when clicked the whole table has to come up, untill then what user experience is snippet
Any javascript codefor this?

</table>

<p>&nbsp;</p>
<table bgcolor="#CB344F" cellpadding="0" cellspacing="0" align="left">
<tr>
<td align="left">
<p>Search Information</p><br/>
<form action="pst.php" method="GET">
First Name:<br/>
<input type="text" name="f" style="width:150px;"><br/>
Last Name:<br/>
<input type="text" name="l" style="width:150px;"><br/>
Company <br/>
<input type="text" name="co" style="width:150px;"><br/>
Skill:<br/>
<input type="text" name="s" style="width:150px;"><br/>
Email: <br/>
<input type="text" name="e" style="width:150px;"><br/>
State: <br/>
<select name="pl" style="width:150px">
                 <option value="">Search By Location</option>
  <option value="">Anywhere</option>
                        <option value="AL OR Alabama">Alabama</option>
                        <option value="AK OR Alaska">Alaska</option>
                        <option value="AR OR Arkansas">Arkansas</option>
                        <option value="AZ OR Arizona">Arizona</option>
                        <option value="CA OR California">California</option>
                        <option value="CO OR Colorado">Colorado</option>
                        <option value="CT OR Connecticut">Connecticut</option>
                        <option value="DE OR Delaware">Delaware</option>
                        <option value="FL OR Florida">Florida</option>
                        <option value="GA OR Georgia">Georgia</option>
                        <option value="HI OR Hawaii">Hawaii</option>
                        <option value="IA OR Iowa">Iowa</option>
                        <option value="ID OR Idaho">Idaho</option>
                        <option value="IL OR Illinois">Illinois</option>
                        <option value="IN OR Indiana">Indiana</option>
                        <option value="KS OR Kansas">Kansas</option>
                        <option value="KY OR Kentucky">Kentucky</option>
                        <option value="LA OR Louisiana">Louisiana</option>
                        <option value="MA OR Massachusetts">Massachusetts</option>
                        <option value="MD OR Maryland">Maryland</option>
                        <option value="ME OR Maine">Maine</option>
                        <option value="MI OR Michigan">Michigan</option>
                        <option value="MN OR Minnesota">Minnesota</option>
                        <option value="MO OR Missouri">Missouri</option>
                        <option value="MS OR Mississippi">Mississippi</option>
                        <option value="MT OR Montana">Montana</option>
                        <option value="NC OR 'North Carolina'">North Carolina</option>
                        <option value="ND OR 'North Dakota'">North Dakota</option>
                        <option value="NE OR Nebraska">Nebraska</option>
                        <option value="NH OR 'New Hampshire'">New Hampshire</option>
                        <option value="NJ OR 'New Jersey'">New Jersey</option>
                        <option value="NM OR 'New Mexico'">New Mexico</option>
                        <option value="NV OR Nevada">Nevada</option>
                        <option value="NY OR 'New York'">New York</option>
                        <option value="OH OR Ohio">Ohio</option>
                        <option value="OK OR Oklahoma">Oklahoma</option>
                        <option value="OR …
j_limboo 0 Junior Poster in Training

This was not in php

but before it goes to php its a HTML form where user fills and php gets the info

I was trying to make a snippet view of table

j_limboo 0 Junior Poster in Training

I was looking to make the complete table a drop down
its should have snippet view and when opened all details should come up

j_limboo 0 Junior Poster in Training

Can anyone help in this please
Just wanted to keep the table as drop down menu

</table>

<p>&nbsp;</p>
<table bgcolor="#CB344F" cellpadding="0" cellspacing="0" align="left">
<tr>
<td align="left">
<p>Search Information</p><br/>
<form action="pst.php" method="GET">
First Name:<br/>
<input type="text" name="f" style="width:150px;"><br/>
Last Name:<br/>
<input type="text" name="l" style="width:150px;"><br/>
Company <br/>
<input type="text" name="co" style="width:150px;"><br/>
Skill:<br/>
<input type="text" name="s" style="width:150px;"><br/>
Email: <br/>
<input type="text" name="e" style="width:150px;"><br/>
State: <br/>
<select name="pl" style="width:150px">
                 <option value="">Search By Location</option>
  <option value="">Anywhere</option>
                        <option value="AL OR Alabama">Alabama</option>
                        <option value="AK OR Alaska">Alaska</option>
                        <option value="AR OR Arkansas">Arkansas</option>
                        <option value="AZ OR Arizona">Arizona</option>
                        <option value="CA OR California">California</option>
                        <option value="CO OR Colorado">Colorado</option>
                        <option value="CT OR Connecticut">Connecticut</option>
                        <option value="DE OR Delaware">Delaware</option>
                        <option value="FL OR Florida">Florida</option>
                        <option value="GA OR Georgia">Georgia</option>
                        <option value="HI OR Hawaii">Hawaii</option>
                        <option value="IA OR Iowa">Iowa</option>
                        <option value="ID OR Idaho">Idaho</option>
                        <option value="IL OR Illinois">Illinois</option>
                        <option value="IN OR Indiana">Indiana</option>
                        <option value="KS OR Kansas">Kansas</option>
                        <option value="KY OR Kentucky">Kentucky</option>
                        <option value="LA OR Louisiana">Louisiana</option>
                        <option value="MA OR Massachusetts">Massachusetts</option>
                        <option value="MD OR Maryland">Maryland</option>
                        <option value="ME OR Maine">Maine</option>
                        <option value="MI OR Michigan">Michigan</option>
                        <option value="MN OR Minnesota">Minnesota</option>
                        <option value="MO OR Missouri">Missouri</option>
                        <option value="MS OR Mississippi">Mississippi</option>
                        <option value="MT OR Montana">Montana</option>
                        <option value="NC OR 'North Carolina'">North Carolina</option>
                        <option value="ND OR 'North Dakota'">North Dakota</option>
                        <option value="NE OR Nebraska">Nebraska</option>
                        <option value="NH OR 'New Hampshire'">New Hampshire</option>
                        <option value="NJ OR 'New Jersey'">New Jersey</option>
                        <option value="NM OR 'New Mexico'">New Mexico</option>
                        <option value="NV OR Nevada">Nevada</option>
                        <option value="NY OR 'New York'">New York</option>
                        <option value="OH OR Ohio">Ohio</option>
                        <option value="OK OR Oklahoma">Oklahoma</option>
                        <option value="OR OR Oregon">Oregon</option>
                        <option value="PA OR Pennsylvania">Pennsylvania</option>
                        <option value="RI OR 'Rhode Island'">Rhode Island</option>
                        <option value="SC OR 'South Carolina'">South Carolina</option>
                        <option value="SD …
j_limboo 0 Junior Poster in Training

Yep Got this Worked in the PHP

Thank You so much
:)

j_limboo 0 Junior Poster in Training

CF
I get $_GET[Q] = the value of text typed

But i dont get the value of State

Appreciate your advice

j_limboo 0 Junior Poster in Training

How to get value from Dropdown and text values Please advice

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<form action="tst.php" method="GET">
Input Keyword: <input type="text" name="q" style="width:200px;">
          <input type="submit" value="Search">
          </form>
<select>
                   <option value="SC">South Carolina</option>
                        <option value="SD">South Dakota</option>
                        <option value="TN">Tennessee</option>
                        <option value="TX">Texas</option>
                         <option value="Alaska Area">Alaska Area</option>
                         </select>
               
</body>
</html>
j_limboo 0 Junior Poster in Training

Actually there are multiple variable going to be there say like 50
When i click on search
all 50 links should hold that query

<html>
<title> </title>
<head>
<script type="text/javascript">

var refine="resume"
var elim="-job"
function google(hit){
hit.q.value= hit.qfront.value+" "+refine+" "+elim

}

</script>

</head>
<body>
<form action="http://www.google.com/search" method="get" onSubmit="google(this)"/>
<p>PureSearch<br />
<input name="q" type="hidden" />
<input name="qfront" type="text" style="width: 180px" /> <input type="submit" value="Search" /></p>
</form>
</body>
</html>
j_limboo 0 Junior Poster in Training

New to javascript please help me create a link after we click on submit button
What is happening is when we click on submit button, it directly does the action on query to google
But instead need this to create a link
I mean when we hit search the javascript has to create a link and not query google
When we click on the link it should query google and not before that

Any solution please advice

<html>
<title> </title>
<head>
<script type="text/javascript">

var refine="resume"
var elim="-job"
function google(hit){
hit.q.value= hit.qfront.value+" "+refine+" "+elim

}

</script>

</head>
<body>
<form action="http://www.google.com/search" method="get" onSubmit="google(this)"/>
<p>PureSearch<br />
<input name="q" type="hidden" />
<input name="qfront" type="text" style="width: 180px" /> <input type="submit" value="Search" /></p>
</form>
</body>
</html>
j_limboo 0 Junior Poster in Training

New to javascript please help me create a link after we click on submit button
What is happening is when we click on submit button, it directly does the action on query to google
But instead need this to create a link
I mean when we hit search the javascript has to create a link and not query google
When we click on the link it should query google and not before that

Any solution please advice

<html>
<title> </title>
<head>
<script type="text/javascript">

var refine="resume"
var elim="-job"
function google(hit){
hit.q.value= hit.qfront.value+" "+refine+" "+elim

}

</script>

</head>
<body>
<form action="http://www.google.com/search" method="get" onSubmit="google(this)"/>
<p>PureSearch<br />
<input name="q" type="hidden" />
<input name="qfront" type="text" style="width: 180px" /> <input type="submit" value="Search" /></p>
</form>
</body>
</html>
j_limboo 0 Junior Poster in Training

almostbob,
That worked
really you are a life saver man
Thumsup to you

j_limboo 0 Junior Poster in Training

the index page is in .php
and now it has to open in rightframe.html

do we have any code to pass on to the rightframe

all the hyperlinks are in the php page itself
want to call a right frame which is in html

Not using mysql database

j_limboo 0 Junior Poster in Training

//echo "<a href=\"$google_pers\"target='blank'>xxxx</a>";


when clicked can it call to open a local file ie rightframe.html
instead of a new blank page

tst.php and rightframe.html are in the same location

I am using very simple html frames. again this is a call when clicked the result or query has to open on rightframe.html

j_limboo 0 Junior Poster in Training

the php process the page once the vistor clicks on the php based link they go to iframe where it is html.
I was looking for a function where I can insert a link call go back to the link and that sould be in html on the frames

j_limboo 0 Junior Poster in Training

this is solved appreciate your help

j_limboo 0 Junior Poster in Training

thats is great but the problem is the codes must hit google
it not going to display results if the http://google... with visitors query and refine search... is not hitting google.
Will iframe do

I was looking for forwarding to another PHP file where include functions and then create url. This going to be advance level for me

I will explain you in detail
The form page gets a query and then it process in this query with a refine search but i dont want action in this page and hide and get another file which should have include or may be wisable function and then process $newUrl as hyperlink
here is code again

<?php
if (!isset($_GET['p']) || empty($_GET['p'])) {
    $_GET['p']=0;
    }
if (empty($_GET['q'])){
echo "Your Search Is Empty";
}
else 
{
/* getting value from the search form creating a new variable*/
$ser = $_GET['q'];
/* applying logic and creating a new variable to it*/
$logic = "~resume (filetype:pdf OR filetype:doc OR filetype:rtf OR filetype:htm OR filetype:html) KEYWORD -jobs -apply -submit -required -wanted -write -sample";
/* replacing KEYWORD*/
$logic = str_replace ("KEYWORD", "$ser", $logic);
/* processing new url*/
$url = "http://www.google.com/search?q=";
$inc = '00&num=100&hl=en&ie=UTF-8&filter=2';
$newUrl = "$url" . "$logic" . "$inc";

}
/* echo newlink*/

echo "<a href='$newUrl'>Google Document Type</a>"
?>

the echo function has to get process in another x.php file

j_limboo 0 Junior Poster in Training

I want hide the code and take it as include function in a different page can be php or html
appreciate your replies
Please advice

j_limboo 0 Junior Poster in Training

Got stuck
How to make $newUrl a hyperlink in a different html page
new to php code

<?php
if (!isset($_GET['p']) || empty($_GET['p'])) {
    $_GET['p']=0;
    }
if (empty($_GET['q'])){
echo "What are you doing?";
}
else 
{
/* getting value from the search form creating a new variable*/
$ser = $_GET['q'];
/* applying logic and creating a new variable to it*/
$logic = "~resume (filetype:pdf OR filetype:doc OR filetype:rtf OR filetype:htm OR filetype:html) KEYWORD -jobs -apply -submit -required -wanted -write -sample";
/* replacing KEYWORD*/
$logic = str_replace ("KEYWORD", "$ser", $logic);

$url = "http://www.google.com/search?q=";
$inc = '00&num=100&hl=en&ie=UTF-8&filter=2';
$newUrl = "$url" . "$logic" . "$inc";    

}
?>
j_limboo 0 Junior Poster in Training

Guys any inputs

j_limboo 0 Junior Poster in Training

Echo google problem
Please advice you inputs are greatly appreciated

<?php
if (empty($_GET['q'])){
echo "What are you doing?";
}
else 
{
/* getting value from the search form creating a new variable*/
$ser = $_GET['q'];
/* applying logic and creating a new variable to it*/
$logic = "~resume (filetype:pdf OR filetype:doc OR filetype:rtf OR filetype:htm OR filetype:html) KEYWORD -jobs -apply -submit -required -wanted -write -sample";
/* replacing KEYWORD*/
$logic = str_replace ("KEYWORD", "$ser", $logic);

$query = file_get_contents('http://www.google.com/search?q='.urlencode (['$logic']).'&start='.$_GET['p'].'00&num=100&hl=en&ie=UTF-8&filter=2');
echo $query;

}
?>
j_limboo 0 Junior Poster in Training

Smartness, you are life saver thank you for making this happen to a baby learner