Advertisement

06.11.2007 at 05:44AM PDT, ID: 22625749
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.8

Open page a specific size

Asked by austenr in PHP and Databases, PHP for Windows

Tags: , , , ,

I need this page to open up about 1/2 size it is now.  Presently it take up the whole screen.  How do you set the page size?  

Code:

 <?php
// Search Code


// Standard Connection Data.
$db_host = "localhost";
//$db_user = "myusername";
//$db_pass = "password";

//mysql_connect("localhost");

//mysql_select_db("cpdata" user="root" password=" ");
$link = mysql_connect('localhost', 'root', '');
if (!$link) {
    die('Not connected : ' . mysql_error());
}

// make cpdata the current db
$db_selected = mysql_select_db('cpdata', $link);
if (!$db_selected) {
    die ('Can\'t use cpdata : ' . mysql_error());
}
//$db_name = "cpt_info";
//$dbac = mysql_connect($db_host);
//mysql_select_db ($db_name) or die ("Cannot connect to database");

if (!$_POST['search']){
// Breaking out of php to display the form.

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "****://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>

<head>
<meta ****-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>CPT Search Form</title>
<body>
<center><img src="logo_extranet.png" alt=""></center>
<center><table width="500"><tr><td><p><font size="3" color="#0000ff"><center>Clinical Database Search Form<center></b></p><br><br><p></p>
<p>This search will result in 4 fields being displayed.</p>
On this form type in what you want to search for, Description, Default CPT.  <br>
If you only know part of the description or number thats o.k.
</td></tr></font></table><br>
<center><form name="Search Tutorial" size="20" method="post" action="">
Enter Your Search Criteria Here:<br>
<label>
<input name="swords" type="text" size="30" maxlength="30">
</label>
<br>
<label>
<input name="search" type="submit" id="search" value="Search">
</label>
</form></center>
<?php
}else{
// Adding slashes and changing tags so that people trying to take advantage of the system can't
$searchwords = addslashes(htmlspecialchars($_POST['swords']));
// Checking the length of string to make sure its more than 1 characters long
if (strlen($searchwords) < 1){
echo "The selection you have entered is too short, please enter another one.";
}else{
$words = explode(' ',$searchwords);
$totalwords = count($words);
$i = 0;
$searchstring = "";
// Looping to get the search string.
while ($i != $totalwords){
if ($i != 0 and $i != $wordcount){
$searchstring .= " and ";
}
$searchstring .= "description LIKE '%$words[$i]%' or defaultcpt LIKE '%$words[$i]%' ";
// Incrementing the value
$i = $i + 1;
}
// Execute the query with the search string just created.
$query = mysql_query("SELECT * FROM cpddata where $searchstring");
// Check for results
echo mysql_error();
if (mysql_num_rows($query) == 0){
echo mysql_error();
echo "No results where found sorry ";
}else{

while ($fet = mysql_fetch_array($query)){
echo     "<p>Description: {$fet['description']}<br />
         Default CPT: {$fet['defaultcpt']}<br />
         Industrial: {$fet['industrial']}<br />
                         Federal: {$fet['federal']}</p>";
                         
}// End While
}// End Else
}// End Else
}// End Else


?>
</body></html>
Start Free Trial
[+][-]06.11.2007 at 06:08AM PDT, ID: 19257741

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.11.2007 at 06:33AM PDT, ID: 19257926

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.11.2007 at 08:13AM PDT, ID: 19258736

View this solution now by starting your 14-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: PHP and Databases, PHP for Windows
Tags: size, open, specific, do, page
Sign Up Now!
Solution Provided By: richswyatt
Participating Experts: 2
Solution Grade: A
 
 
[+][-]07.20.2007 at 08:50AM PDT, ID: 19532257

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 14-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]07.24.2007 at 07:45PM PDT, ID: 19562071

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 14-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-43