Search found 87 matches
- Wed Dec 10, 2008 2:04 pm
- Forum: PHP - Code
- Topic: Check if string is empty
- Replies: 8
- Views: 364
Re: Check if string is empty
$_POST[uploadfile] doesn't exist. Read up on how to handle file uploads . <label for="image">Image:</label><input type="file" name="uploadfile" class="rightinput"/> It's uploading, resizing, and moving them fine. It's just that I can't say "if there is d...
- Wed Dec 10, 2008 1:45 pm
- Forum: PHP - Code
- Topic: hi, can someone help me...
- Replies: 4
- Views: 262
- Wed Dec 10, 2008 1:00 pm
- Forum: PHP - Code
- Topic: Check if string is empty
- Replies: 8
- Views: 364
Re: Check if string is empty
If I use this: if(strlen($image)<2){ // Image Handling // This is the temporary file created by PHP $uploadedfile = $_FILES['uploadfile']['tmp_name']; // Create an Image from it so we can do the resize $src = imagecreatefromjpeg($uploadedfile); // Capture the original size of the uploaded imag...
- Wed Dec 10, 2008 11:01 am
- Forum: PHP - Code
- Topic: Check if string is empty
- Replies: 8
- Views: 364
Check if string is empty
Hello everyone, I'm trying to upload an image and if no image is uploaded, I want it to default to another image. My string keeps coming out like this though, and I can't figure out how to do an if/else on it so I can apply it properly. string(0) "" Here's some of the PHP I'm using now: $i...
- Fri Oct 24, 2008 3:38 pm
- Forum: PHP - Code
- Topic: Select * From Variable help
- Replies: 16
- Views: 20235
Re: Select * From Variable help
Thank you. That fixed it and I understand why it didn't work.
Thank you very much for your help today. If you're ever in Northwest Florida, send me a PM. I owe you a drink.
Thank you very much for your help today. If you're ever in Northwest Florida, send me a PM. I owe you a drink.
- Fri Oct 24, 2008 3:15 pm
- Forum: PHP - Code
- Topic: Select * From Variable help
- Replies: 16
- Views: 20235
Re: Select * From Variable help
Hmmm, it's working, but it's giving me the results twice. normal Aliquam at arcu. Vivamus nunc. Sed pharetra elementum felis. Sed eget magna sed diam vulputate blandit. In hac habitasse platea dictumst. Nam in ante. Aenean vel nibh at eros egestas placerat. Sed tincidunt dictum mauris. Cras sodales ...
- Fri Oct 24, 2008 2:59 pm
- Forum: PHP - Code
- Topic: Select * From Variable help
- Replies: 16
- Views: 20235
Re: Select * From Variable help
Ok so now it's just spitting out single characters. Here's what I've got: <?require_once('/home/content/r/e/v/revivemedia/html/db/inc/global.php'); session_start(); if(!session_is_registered(myusername)){ header("location:index.php"); } $myclientname=$_GET['client']; //output h...
- Fri Oct 24, 2008 2:16 pm
- Forum: PHP - Code
- Topic: Select * From Variable help
- Replies: 16
- Views: 20235
Re: Select * From Variable help
Nevermind, I got it. The $clientname and $myclientname variables were mismatched.
- Fri Oct 24, 2008 2:07 pm
- Forum: PHP - Code
- Topic: Select * From Variable help
- Replies: 16
- Views: 20235
Re: Select * From Variable help
Okay now I'm really confused. How come it won't work here? <?require_once('/home/content/r/e/v/revivemedia/html/db/inc/global.php'); session_start(); if(!session_is_registered(myusername)){ header("location:index.php"); } $myclientname=$_GET['client']; //output header e...
- Fri Oct 24, 2008 1:41 pm
- Forum: PHP - Code
- Topic: Select * From Variable help
- Replies: 16
- Views: 20235
Re: Select * From Variable help
mysql_result is for retrieving a row at a specific position. If you just want the next row, use _fetch_array , _fetch_assoc , _fetch_row , or _fetch_object . Like you did earlier with $array = mysql_fetch_array($result); $clientname=($array["client"]); You rule. I finally got it working. ...
- Fri Oct 24, 2008 1:01 pm
- Forum: PHP - Code
- Topic: Select * From Variable help
- Replies: 16
- Views: 20235
Re: Select * From Variable help
I don't get this part: $statusx = mysql_result($resultx,$i,"status"); $i is the client number from the clients table - what does that have to do with the individual clients? If I take the $i away, it doesn't output anything. I only had it so it progressed. I suppose I don't need it though...
- Fri Oct 24, 2008 12:49 pm
- Forum: PHP - Code
- Topic: Header Problems/Session Register
- Replies: 8
- Views: 354
Re: Header Problems/Session Register
Your code has a line break before the <?php.
Try removing that output and see if it works.
Try removing that output and see if it works.
- Fri Oct 24, 2008 12:47 pm
- Forum: PHP - Code
- Topic: multiple file upload
- Replies: 5
- Views: 753
Re: multiple file upload
Just try using these parts: if ((($_FILES["file"]["type"] == "image/gif") || ($_FILES["file"]["type"] == "image/jpeg") || ($_FILES["file"]["type"] == "image/pjpeg")) && ($_FILES["file"]["...
- Fri Oct 24, 2008 12:29 pm
- Forum: PHP - Code
- Topic: Select * From Variable help
- Replies: 16
- Views: 20235
Re: Select * From Variable help
Outside the loop $result=mysql_query($sql) or die (mysql_error()); and then again inside the loop $result=mysql_query($sql) or die (mysql_error()); You overwrite the first $result inside the loop, so the second time through it doesn't work. Yeah I was worried about that once before, but when I chan...
- Fri Oct 24, 2008 12:13 pm
- Forum: PHP - Code
- Topic: Select * From Variable help
- Replies: 16
- Views: 20235
Re: Select * From Variable help
$sql = "SELECT * FROM '$clientname' "; I think $sql = "SELECT * FROM '$clientname' "; Gives me this: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''Children_of_Bodom'' at line 1 This is ...