Nate_23
-
Posts
6 -
Joined
-
Last visited
Never
Posts posted by Nate_23
-
-
I'm hoping to make a file upload form to upload a pdf file and then convert it to text and display. Does anyone know how to do this?
-
Hey,
I'm trying to make a single checkbox that will select all the checkboxes in a group. I have a working code; at least it works on the first two sets of checkboxes. However, it does not work on the final set. (Quick note: the mysql stuff all works. It can easily be tested by changing the MySQL table name.)
If anyone has found a way around this problem that would be great.
Thanks!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<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>
<script type="text/javascript">
function checkAll(checkName, checkValue) {
for (i = 0; i < checkName.length; i++)
checkName.checked = checkValue.checked? true:false
}
</script>
<?php
echo "<form name='first'>
<input type='checkbox' name='checkThem' onClick='checkAll(document.second.checkGroup,this)'>Check All (1)</form>
<form name='second'>
<input type='checkbox' name='checkGroup' >First<br/>
<input type='checkbox' name='checkGroup' >Second<br/>
<input type='checkbox' name='checkGroup' >Third<br/>
<input type='checkbox' name='checkGroup' >Fourth</form>";
echo "<br/>";
?>
<form name="third">
<input type="checkbox" name="checkThem" onClick="checkAll(document.fourth.checkGroup,this)">Check All (2)</form>
<form name="fourth">
<input type="checkbox" name="checkGroup" >First<br/>
<input type="checkbox" name="checkGroup" >Second<br/>
<input type="checkbox" name="checkGroup" >Third<br/>
<input type="checkbox" name="checkGroup" >Fourth
</form>
<?php
echo "<br/>";
include_once "connect_to_mysql.php";
$sql = "SELECT * FROM mysqltablename";
$result = mysql_query($sql) or die ("Couldn't get results.");
$num = mysql_num_rows($result);
echo "<form name='fifth'>
<input type='checkbox' name='checkThem' onClick='checkAll(document.sixth.checkGroup,this)'>Check All (3)</form>";
while($row = mysql_fetch_assoc($result)) {
$id = $row['id'];
echo "<form name='sixth'>
<input type='checkbox' name='checkGroup'>$id<br/></form>";
}
?>
</body>
</html>
-
Oops, I perhaps made that look simpler that I had meant to.
After getting the items from the database, I need to separate them as well. Which is why I had had them queried individually.
What I'm hoping to have is something similar to this:
<?php
$sql = "SELECT * FROM items";
$result = mysql_query($sql) or die ("Couldn't get results.");
$num = mysql_num_rows($result);
while($row = mysql_fetch_assoc($result)){
$clothingtype = $row['clothingtype'];
/// separate clothingtype into alike types (all pants, all socks, etc. together).
/// should be 125 items with the value "shoes", 44 "Socks", 56 "Pants
}
echo "<form name='myform'>
<select name='option1' size='1'>
<option value='$clothingtype1'>$clothingtype1 $numberofclothingtype1 items</option>
<option value='$clothingtype2'>$clothingtype2 $numberofclothingtype2 items</option>
<option value='$clothingtype3'>$clothingtype3 $numberofclothingtype3 items</option>
.... etc";
-
Hey,
I am wanting to make a script that will create a dropdown menu with different types of items (Shoes, Socks, Pants, ...) and how many items there are of that type (125, 44, 56, ...). I'm wondering if there is a way to check a mysql field for different several entries. Currently, I am using many queries like:
$sql1 = "SELECT * FROM items WHERE clothing='Shoes'";
$result1 = mysql_query($sql1) or die ("Couldn't get results.");
$num1 = mysql_num_rows($result1);
$sql2 = "SELECT * FROM items WHERE clothing='Socks'";
$result2 = mysql_query($sql2) or die ("Couldn't get results.");
$num2 = mysql_num_rows($result2);
$sql3 = "SELECT * FROM items WHERE clothing='Pants'";
$result3 = mysql_query($sql3) or die ("Couldn't get results.");
$num3 = mysql_num_rows($result3);
Is there a way to get all that done with one query? Is there a way to tell when the mysql field changes and then use a function? Thanks.
-
Does anyone know how to limit the size (height, width) of pictures in a file upload?
Extract text from PDF
in Miscellaneous
Posted
Hey man, I actually took a look through that page of the manual before posting my question. I'm afraid that I'm just not seeing any function that deals with extracting the text from the pdf. Maybe I'm just not seeing it, or tired, or confused... I'm just trying to help a buddy of mine out and wondering if someone can point us to a tutorial or something.