buddylee17 216 Practically a Master Poster

Not too sure about that. What I would do is put an onsubmit action in the form element.
<form name="deleteform" method="post" action="<? echo $_SERVER?>" onsubmit="return checkdelete();">

buddylee17 216 Practically a Master Poster

Or to just disable the button: <input type="submit" name="delete" onclick="this.disabled='disabled';" />

buddylee17 216 Practically a Master Poster

Gotcha! <input type="submit" name="delete" onclick="this.style.display='none';" />

buddylee17 216 Practically a Master Poster

What about this: <div style="display:none"><input type="submit" name="delete" onclick= "return checkdelete()" /></div>

buddylee17 216 Practically a Master Poster

Not exactly sure what you are asking. You want to hide the delete button? If so, use css:

<input name="delete" id="delete" type="submit" value="Delete User" onClick="return checkDelete();" <?php if(some condition){echo "style='display:none'"; }?> />
buddylee17 216 Practically a Master Poster

Your php insert is happening as page 4 loads. Move the insert up to the top with the rest of the php. Also, surround the insert with a conditional to check if the smoke button has been selected
and the submit button has been pushed i.e.:

if(isset($_POST['submit']) && isset($_POST['smoke'])){
//insert into the db
}
buddylee17 216 Practically a Master Poster

These variables will be empty if someone
A.)gets to your site via a link with a target="_blank".
B.)types the url directly into the browser
C.)Came from a bookmark or favorite
D.)Right clicked to open your link in a new tab/window

buddylee17 216 Practically a Master Poster

In valid CSS, the id is always unique and is only used once per page. If you have a common style for multiple divs, images, links, paragraphs, ... write a class for them. That being said, the css for the div id would be:

#text2{
position:absolute; 
overflow:hidden; 
left:325px; 
top:362px; 
width:143px; 
height:29px; 
z-index:2;
font-family: Calibri;
font-size: 15px
}

and for the image1 id

#image1 {
background-image:
url ('untitled.PNG');
position:absolute; 
overflow:hidden; 
left:0px; 
top:0px; 
width:737px; 
height:367px; 
z-index:0;
border=0;
}

The leading # sign in css indicates that you are defining attributes for an id. If a period came before the name, it would indicate that it is a class. You could also include the class for the password field:

.ws11{
font-family: Calibri;
}

The advantage of putting all of the css in an external style sheet is that the sheet will get cached by the browser and won't have to be read for every page in your site. If all the styles are inline, it will increase the load time of each page.

buddylee17 216 Practically a Master Poster

Notepad defaults to the extension .txt. You must change the Save As Type drop down menu to all files. You can also wrap it with quotes to save as .php.

buddylee17 216 Practically a Master Poster

Suggestions:
Make sure that Apache is running. If you're not sure if it's running check the processes section of the task manager. Some versions of WAMP require you to manually start Apache.
Also make sure you are previewing the file under localhost in the browser.
Should look something like http://localhost/wamp/ or just http://localhost/

buddylee17 216 Practically a Master Poster

Use php's date function to determine what to do.
If you are pulling dates from the calendar, they'll have to be in the same format as the date function. The following variable, $today, will echo or print out January 25, 2008.

$today=date('F d, Y');

Now compare the $today variable and the date from the calendar to determine what is done next.

if($today>=$date){
//do something for present and future dates
}else{
//do something else for past dates
}
buddylee17 216 Practically a Master Poster

Do a SELECT to find the user_id for the current user in the USER table. Assign the user_ID to a variable, $user_ID. Now do your UPDATE on the USER_INFORMATION table using WHERE user_ID='$user_ID'

hooray commented: good solution +1
buddylee17 216 Practically a Master Poster

Create a .php file with your connection information. Something like this:

//connect.php
<?php
$dbhost = 'localhost';
$dbuser = 'username';
$dbpass = 'password';
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die('Error connecting to mysql');
$dbname = 'dbname';
mysql_select_db($dbname);
?>

Now store it on the server above the root. When you are ready to connect to the db, include the file in your script. The server will read it the same as if it were in the script. This is also handy for headers and footers. Instead of modifying every page, you just change that one file.

<?php
require './connect.php'; //you could also use include './connect.php';
$sql="SELECT * FROM table";
buddylee17 216 Practically a Master Poster

Absolutely. Try this.

<form action="whatever.php" method="POST" onsubmit="return confirm('Are you sure you want to submit this data?')">

Keep in mind, you'll still want to have some server side validation.

buddylee17 216 Practically a Master Poster

Yes, use the substr function:

$script = substr($script, 0, -2);

If this trims too much, try changing the -2 to -1.

buddylee17 216 Practically a Master Poster

You'll need to know a little bit about what variables the paypal cart requires. If you're familiar with how it works in html, then you can do something similar in actionscript. Declare all the variables that normally are hidden in the form after the on(release){. In your buttons' action palette, use something like

on (release) {
declare all your variables here
getURL("https://www.paypal.com/cgi-bin/webscr ","_blank", "POST");
}

Have a look here for a more in depth look.

buddylee17 216 Practically a Master Poster
ALTER TABLE jos_afm_cats add column date TIMESTAMP ;

This will add a field called date which will record the date and time that the value was entered. Then when you pull the data using a SELECT command, use ORDER BY date DESC at the end of the query. So to pull the 5 most recent, Use:

SELECT * FROM jos_afm_cats ORDER BY date DESC Limit 5;
buddylee17 216 Practically a Master Poster

The easiest way to do this is with $_SERVER; This will tell the server what page referred them to that page by.
Because http is a stateless protocol, this can be easily manipulated though. Another way would be to set a variable on a previous page that could be passed like:
<input type='hidden' name='referrer' value='England' /> and then access the variable from the mail form.

buddylee17 216 Practically a Master Poster

To find out if an id is being passed, can you test the data_fetch.php page using a sample id in the query string? In other words type the url into the browser and include an id that you know is in the database. Like this:
http://www.domainname.com/data_fetch.php?id=23

This will at least tell you if the problem is in the data_fetch.php page.
Also you need a where clause in your $sql query.
"$sql="select emp_id from emp_detail";"

buddylee17 216 Practically a Master Poster

You would probably get a better answer if posted in the JavaScript forum. The idea would be to create a function that enabled one textbox while disabling the rest. Replace the word form with the forms name.

<script type="text/javascript">
<!--
function changestate()
{
  if(document.form.r1.checked)
  {
  document.form.t1.disabled='false';
  document.form.t2.disabled='true';
  document.form.t3.disabled='true';
  document.form.t4.disabled='true';
  }
  else if(document.form.r2.checked)
  {
  document.form.t1.disabled='true';
  document.form.t2.disabled='false';
  document.form.t3.disabled='true';
  document.form.t4.disabled='true';
  }
  else if(document.form.r3.checked)
  {
  document.form.t1.disabled='true';
  document.form.t2.disabled='true';
  document.form.t3.disabled='false';
  document.form.t4.disabled='true';
  }
  else if(document.form.r4.checked)
  {
  document.form.t1.disabled='true';
  document.form.t2.disabled='true';
  document.form.t3.disabled='true';
  document.form.t4.disabled='false';
  }
}
// -->
</script>

Then throw in an onlick attribute to call the function.

<input type="radio" name="r1" id="r1"  onclick="changestate()" />

I think this should work. I'm sure there is a better way. If you can't get it to work, repost the problem in the JavaScript forum.

buddylee17 216 Practically a Master Poster

newcountry, sql injection is not desirable. You want to download it? Sorry it's not some open source program you can download.

SQL injection is a technique used by hackers to exploit your database. It can be used to view, update, or delete data, without the knowledge of the db admin.

Wanna learn more?
http://unixwiz.net/techtips/sql-injection.html

Ramy Mahrous commented: Very good (Y) +2
buddylee17 216 Practically a Master Poster

I also think that Firefox is slightly faster to load and deliver pages. It's ten times faster to install. It also has tons of free addons. My favorite is Web Developer. It gives you a menu full of developer tools that allow you to use custom css pages, disable javascript and cookies on the fly, and tons of other handy stuff. But as a designer or developer, you are making a huge mistake if you don't test your pages in both browsers. While most of us use Firefox, most users of your site are still on IE because that's the browser that shipped with their dell or hp and they don't know what the hell a Firefox is.

buddylee17 216 Practically a Master Poster

This is true. There are losers, or more kindly referred to by fest3er as miscreants, with nothing better to do than to try to hack your db. It's sometimes called query stacking. Anytime the query depends on or can be manipulated by the users input, injection is possible and must be checked thoroughly. But you have to walk before you crawl. PHP noobs learn how to make the script work long before they learn how to make it secure. SQL injection is not hard to prevent but if the site is still in development, who cares? Make it work, then fix security issues, then implement the system and let the user add data. Your goal should be to make it work and to understand why it works. Post questions and learn. Take small steps. You cant learn everything at once. Just dont let users add sensitive data until it has been tested to be safe.

buddylee17 216 Practically a Master Poster

Get rid of the single quotes around your table name and field name. $sql = "INSERT INTO addurl (u_link) VALUES ('$URL')";

buddylee17 216 Practically a Master Poster

Yeah good point Midi. Kobi, are you trying to preview the page locally or have you uploaded it to a server?

buddylee17 216 Practically a Master Poster
buddylee17 216 Practically a Master Poster

Very close. Remember, variables are case sensitive.
<input type="text" name="username" maxlength="12"/>
Then in the php you have:
$Username = $_POST["Username"];
Should be:
$Username = $_POST["username"];
The same goes for email, wing, and comment. Looks like your getting the hang of it though.

buddylee17 216 Practically a Master Poster

This is the absolute simplest way to do it. You'll have to take measures to prevent sql injection and implement other security features.
Place a link on the returned result like this:

echo"
<a href='whatever.php?name=$name'>$name</a>";

It would look something like:
Bill
Bob
Sue
Obviously, you'll have to replace whatever.com and whatever.php with the appropriate domain and file.
Then at the beginning of whatever.php, pull the name variable from the querystring using GET or REQUEST:

$name=$_GET['name'];

Now do the query using the variable from the querystring:

$sql="SELECT * FROM tablename WHERE name='$name'";
buddylee17 216 Practically a Master Poster

Try opening my_htm.html with Firefox or IE and copy the URL at the top. Now paste it into the value in your data attribute. It should start with C:/

I believe it will be something like:

<object data ="C:/AA/bin/my_html.html" width="500" height="300"></object>

Edit: I can only get this to work in Mozilla Firefox. With IE7, I'm getting Active X alerts.

buddylee17 216 Practically a Master Poster

Yes it could be done. I doubt that many people would want to login off of your server though. Too much phishing going on these days.

buddylee17 216 Practically a Master Poster

Stupid question. Where is your connection to the database?

buddylee17 216 Practically a Master Poster

The Firefox error console (Tools->Error Console) says
"Unexpected end of file while searching for ',' or '{'. Ruleset ignored due to bad selector. "
It also has a link under that, when clicked, shows the source code for your css and highlights the first line of code(/*******************). This tells me that FF is finding your css file, it just doesn't like it.
I think it is somehow linked to all the comments in your .css file. Try making a copy with no comments in it and using it to see what happens.
Don't feel bad, apparently you aren't the only one scratching your head over this. Google the error.

buddylee17 216 Practically a Master Poster

Yeah I agree with Naveen. Do your redirect before any echo or print function, <doctype>, or <html> tag. This will also help keep the logic and design separate.

buddylee17 216 Practically a Master Poster

I found another way to do this.
The table name is Employees . The field name is Role. The query finds all rows in Role that contain an A and the word Sales and returns them in order of relevancy.

SELECT *, MATCH(Role)
AGAINST('+A* *Sales' IN BOOLEAN MODE)AS relevance FROM Employees ORDER BY relevance DESC;

Hopefully you can manipulate this code and get it to work for you.

buddylee17 216 Practically a Master Poster

Pick the row you want to alphabetize and use the ORDER BY clause.

SELECT * FROM table ORDER BY name DESC;

ASC can also be used to sort ascending.

buddylee17 216 Practically a Master Poster
SELECT * FROM mytable WHERE MATCH(title,content)
AGAINST('+search* ~term' IN BOOLEAN MODE) ORDER BY relevance DESC;

No you, the person writing the query, are telling MySQL to return the results in order of relevance. The +sign means that all words must contain the word search. The * is a wildcard meaning that searched, searching, and searchable will be returned. If the record also contains the word term it will be returned and will be considered less relevant than those which dont contain it, due to the ~ operator. If you want the word term to increase the relevancy, dont use the ~.
MySQL uses your query as a kind of voting system. How you arrange your query and which operators you use, determines which row gets the most number of votes. The row with the most votes gets returned first.

buddylee17 216 Practically a Master Poster

View the source code on the page. Find the class name you want to modify and assign css to it. Here's an example:

//This is the source code:
<span class="blacktext12">
                            <span id="ctl00_Main_ctl00_UserNetwork1_ctrlMessage">bill is in your extended network</span>
                            <br>
                        </span>

Now assign some css properties to that class:

span.blacktext12 {
visibility:visible !important; 
background-image:url("http://www.domainname/picname.jpg"); background-repeat:no-repeat; 
background-position:center;
font-size:0px;  
width:400px; 
height:358px; 
display:block !important;
 }

The same goes for the contact table.

buddylee17 216 Practically a Master Poster

Wow, I looked at your site in both IE and Firefox. Brings back some bad memories. Here is what I do. Copy your current css and rename the copy ie_fixes.css. This sheet will be used to fix Internet Exploder. Here's an example of how to do it:

<link href="default.css" rel="stylesheet" type="text/css" />
<!--[if IE]><style type="text/css">@import "ie_fixes.css";</style><![endif]-->

The first, default.css is a pretty standard way to implement a style sheet. All browsers will read this. The second is only read by IE. All other browsers treat it as a comment and ignore it. IE will read both but will use ie_fixes. You'll have to modify the ie_fixes.css until you get things looking right. Hope it helps!

buddylee17 216 Practically a Master Poster

Where is the variable $class_name coming from and how is it populated? On line 3 of index.php, you have $page = new Page(); but, you never defined the class Page() in stdlib.php. I see you did it on Page.php but this will only have a local scope of the page its defined in.

buddylee17 216 Practically a Master Poster

SELECT * FROM mytable WHERE MATCH(title,content)
AGAINST('+search* ~term' IN BOOLEAN MODE) ORDER BY relevance DESC;

Have a look at this for more information.

buddylee17 216 Practically a Master Poster

Assuming you already know how to connect to the database and that your form method was post:

$name=$_POST['name'];
$age=$_POST['age'];
$sql="INSERT INTO Client (name,age) VALUES ('$name','$age')";
$result=mysql_query($sql) or die(mysql_error());
$sql="INSERT INTO Client2 (name,age) VALUES ('$name','$age')";
$result=mysql_query($sql) or die(mysql_error());
buddylee17 216 Practically a Master Poster

php designer does a good job with debugging. Like php, its free to download. It has a code coloring scheme similar to dreamweavers that will help you spot syntax errors and the debug will find errors and tell you what line the error is found on.

buddylee17 216 Practically a Master Poster

Sounds like somewhere in your connection, either the username or password is wrong. If the host was wrong the error would say Unknown MySQL server host. It's strange because usually the error would be :
Access denied for user: '*****@localhost' .
instead of
Access denied for user: 'xxxxxxxx@nsev7a.hostfor2bucks.com'

buddylee17 216 Practically a Master Poster

Are you still getting access denied? If so, try this:

$dbhost = 'localhost';
$dbuser = 'jaysusername';
$dbpass = 'jayspassword';
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die('Error connecting to mysql');
$dbname = 'befit4riding_com_-_journal';
mysql_select_db($dbname);

Insert Syntax for MySQL:
If you were inserting the variables $email and $name into the table you would use:

INSERT INTO food_journal (email,name) VALUES ('$email','$name')";

Where the left side of VALUES is the actual fieldnames in the table and the right side of VALUES is the variables you want to insert.

buddylee17 216 Practically a Master Poster
mysql_connect(localhost,$username,$password);

should be

mysql_connect('localhost',$username,$password);

Try this and see what happens.

buddylee17 216 Practically a Master Poster

The $_POST is empty.

<td> <input type = text size = 30 id = id value ="' . $row['id'] . '" disabled></text></td>

You never gave the inputs a name attribute. While assigning both a name and id is good practice, php is looking specifically for the name attribute. Also remember to put quotes around the attributes values.

<td> <input type = "text" size = "30" name="id" id = "id" value ="' . $row['id'] . '" disabled="disabled" /></td>
buddylee17 216 Practically a Master Poster

Are you wanting to put all of the variables into one string called $message? If so:

$message = "$name_req  $lastname_req  $address_req  $City_req,$State  $Zip  $Phone  $parkingspace_size  $ministorage_size  $comments"; 
mail( "e.williams.bis@gmail.com", "Questions About you Spaces Available.",
$message,"From: $Email_Address" );
buddylee17 216 Practically a Master Poster

I'm sure that your firm doesn't use the $3.99/month small business plan though. Here is a list of disabled functions straight from the phpinfo page: getmyinode, getopt, getrusage, extension_loaded, dl, mysql_pconnect, crack_check, crack_closedict, crack_getlastmessage, crack_opendict, fsockopen, pfsockopen, mysql_list_dbs, mysql_stat, ini_get, ini_get_all, ini_alter, ini_set, get_current_user, get_defined_constants, get_include_path, php_ini_scanned_files, php_uname, phpcredits, restore_include_path, set_include_path, set_time_limit, version_compare, zend_version, getmypid, getmyuid, getmygid, assert_options, assert, fopen, fwrite, fread, file, fpassthru, file, mail, opendir, readdir, closedir

buddylee17 216 Practically a Master Poster

Your host isn't GoDaddy is it? The reason I ask is because a recent client of mine hosts with them and I couldn't figure out what was wrong with the mail script. After a little research I found that they have the mail() function as well as many others disabled on their servers.

buddylee17 216 Practically a Master Poster

Try this. I haven't tested it but it should do the trick. The key is to use the @ sign on line 2 to prevent the error message from showing up on the clients browser. Also, if you add or die(mysql_error()) to the end of line 2, the script will stop.

$sql="SELECT * FROM $table";
$result=@mysql_query($sql);
if (!$result)
{
echo "No table exists";
// Create a MySQL table 
$tblname=$_SESSION['ID'];
mysql_query("CREATE TABLE $tblname(
id INT NOT NULL AUTO_INCREMENT, 
PRIMARY KEY(id),
 name VARCHAR(30), 
 age INT)")
 or die(mysql_error());  
echo " so I created one!";
}