hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : PHP Support Needed. Fast.
Reply

Programming Discussion Discussions related to web programming languages and other related issues. Topics may include configuration, optimization, practical usage and database connectivity.
Forum Jump

PHP Support Needed. Fast.

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 11-07-2005, 07:59 PM
CircuitHost CircuitHost is offline
Newbie
 
Join Date: Nov 2005
Posts: 27
Question

PHP Support Needed. Fast.


I have created a basic HTML/PHP script that updates the news section of my website. Everything is working well with the exception of this one problem.

My form is below for inserting/updating.

Date: (input=text)
Title: (input=text)
Content: (textarea)

-------------
When submitting, it works great! When I try to update the row of the table, everything updates correctly EXCEPT the title. If the title is one or more words, it cuts off every word but the frist word. Any ideas on how to get it so it will display the whole value in the text field when updating?
-------------
Need this fixed tonight if all possible.
** I will check back at 8:30 EST

--Thank you!

Reply With Quote


Sponsored Links
  #2  
Old 11-07-2005, 08:09 PM
Burhan Burhan is offline
Community Guide
 
Join Date: Jul 2003
Location: Kuwait
Posts: 5,100
Check your quotes around the HTML.

<input type="text" name="text" value="hello "there" I want to talk about "this" thing" />

That will display a field with just hello in it.

Instead, if you were to use this:

<input type="text" name="text" value='hello "there" I want to talk about "this" thing"' /> you would see the expected result.

__________________
In order to understand recursion, one must first understand recursion.
If you feel like it, you can read my blog
Signal > Noise

Reply With Quote
  #3  
Old 11-07-2005, 09:13 PM
shoperotic shoperotic is offline
Junior Guru Wannabe
 
Join Date: Jan 2003
Location: Romania
Posts: 96
Or maybe try with textarea instead of text input box.

__________________
Dotboost Technologies - Enterprise PHP Solutions

I treat PHP hate as a strong indicator of an inexperienced, insecure developer.

Reply With Quote
Sponsored Links
  #4  
Old 11-07-2005, 09:18 PM
CircuitHost CircuitHost is offline
Newbie
 
Join Date: Nov 2005
Posts: 27
Sorry- I forgot to enter my code. This is what isnt working

Quote:
<input type=text name=title size=20 tabindex=2 value=$row[title]>

Reply With Quote
  #5  
Old 11-07-2005, 09:43 PM
CircuitHost CircuitHost is offline
Newbie
 
Join Date: Nov 2005
Posts: 27
Board Closed, Thanks for the help. This is for someone else.

Quote:
<?
// Upload settings
$folder = "files/"; // Folder in which to store files
$maxlimit = 10000000; // Set maximum file limit (in bits)
$allowed_ext = "doc,xls,pdf,txt"; // Set allowed extensions (split using comma)
$overwrite = "no"; // Allow file overwrite? yes/no
$match = ""; // Clear match variable; for security purposes
$filesize = $_FILES['userfile']['size']; // Get file size (in bits)
$filename = strtolower($_FILES['userfile']['name']); // Get file name; make it all lowercase

if(!$filename || $filename==""){ // File not selected
$error = "- No file selected for upload.<br>";
}elseif(file_exists($folder.$filename) && $overwrite=="no"){ // Check if file exists
$error = "- File already exists: $filename<br>";
}
// Check if file size
if($filesize < 1){ // File is empty
$error .= "- File size is empty.<br>";
}elseif($filesize > $maxlimit){ // File is more than maximum
$error .= "- File size is too big.<br>";
}
$file_ext = preg_split("/\./",$filename); // Split filename at period (name.ext)
$allowed_ext = preg_split("/\,/",$allowed_ext); // Create array of extensions
foreach($allowed_ext as $ext){
if($ext==$file_ext[1]) $match = "1"; // File is allowed
}
// File extension not allowed
if(!$match){
$error .= "- File type isn't allowed: $filename<br>";
}
if($error){
print "Error trying to upload file:<br> $error"; // Display error messages
}else{
if(move_uploaded_file($_FILES['userfile']['tmp_name'], $folder.$filename)){ // Upload file
print "Success! The file has been uploaded: $filename";
}else{
print "Error! File size might exceed upload limit of server. Try again."; // Display error
}
}
?>

Reply With Quote
  #6  
Old 11-09-2005, 02:21 AM
JNadolski JNadolski is offline
Web Hosting Guru
 
Join Date: Jul 2003
Location: Michigan
Posts: 250
You get the problem fixed?

__________________
Custom Identities, Design, Marketing, Promotion & Publishing
Experience the Advantage "Brand Your Business Successfully"

Reply With Quote
  #7  
Old 11-09-2005, 10:57 AM
BroadAndElmwood BroadAndElmwood is offline
Junior Guru Wannabe
 
Join Date: Mar 2005
Posts: 48
Quote:
Originally Posted by CircuitHost
Sorry- I forgot to enter my code. This is what isnt working
Doublequotes are your friend.


Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Software AG Acquires Cloud PaaS Vendor LongJump Web Hosting News 2013-04-26 12:05:25
DigiCert to Issue High-Assurance SSL Certificates in Under an Hour Web Hosting News 2012-08-28 17:12:17
Web Host GeekStorage Opens New Office in Oklahoma, Names Account Manager Web Hosting News 2012-07-31 14:04:33
Cloud Security Firm AlertLogic Partners with Novotus to Grow Employee Base Web Hosting News 2012-03-07 17:05:03
Cirrus Tech Updates its VPS Hosting Offering Web Hosting News 2011-12-20 22:30:00


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?