Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 12-07-2010, 08:37 PM Daily Update Code
buckshot5792's Avatar
Experienced Talker

Posts: 32
Name: Josh
Location: Chester, VA
Trades: 0
Ok my uncle just opened up a restaurant and I'm making his website. I have everything covered except he wants a "Blackboard" where he can update each day for the daily specials. He isn't a coder or anything so is there anyway I can create a form where he can enter the data and it will post it on the "Blackboard" page and erase the data from yesterday?

Thanks for any help,
Josh Sibley
__________________
Nothing runs like a Deer, nothing stops 'em like a Browning!
Vegetarian - Old Indian word for bad hunter.
I wish everybody could understand a full-blooded dog hunting man.
buckshot5792 is offline
Reply With Quote
View Public Profile Visit buckshot5792's homepage!
 
 
Register now for full access!
Old 12-07-2010, 08:43 PM Re: Daily Update Code
Super Spam Talker

Posts: 879
Name: Paul W
Trades: 0
Is he capable of creating a flat text file and uploading it? Then make the specials page a php which reads the file and displays the content -- that's the easiest way and uses only very simple php. Or you can use a form and that can write to a text file.

Last edited by PaulW; 12-07-2010 at 08:53 PM..
PaulW is offline
Reply With Quote
View Public Profile
 
Old 12-07-2010, 11:38 PM Re: Daily Update Code
buckshot5792's Avatar
Experienced Talker

Posts: 32
Name: Josh
Location: Chester, VA
Trades: 0
A text file such as .txt? Yeah I can show him that easy. Would he have to upload the file using PHP or is there a way I can let him go to a certain page and use an upload function? Also, how would I go about creating that PHP script. I'm no PHP pro so if you could post a link to a tutorial with that code it would be greatly appreciated.

Thanks again,
Josh Sibley
__________________
Nothing runs like a Deer, nothing stops 'em like a Browning!
Vegetarian - Old Indian word for bad hunter.
I wish everybody could understand a full-blooded dog hunting man.
buckshot5792 is offline
Reply With Quote
View Public Profile Visit buckshot5792's homepage!
 
Old 12-07-2010, 11:48 PM Re: Daily Update Code
NullPointer's Avatar
Will Code for Food

Posts: 2,815
Name: Matt
Location: Irvine, CA
Trades: 0
Quote:
Originally Posted by buckshot5792 View Post
is there anyway I can create a form where he can enter the data and it will post it on the "Blackboard" page and erase the data from yesterday?
Yes.

If you don't need to track previous 'blackboard' entries you can do this just by storing the form data in a flat file then reading it back in to display it.

The form:
HTML Code:
<form action="" method="post">
<textarea name="blackboard">
</textarea>
<input type="submit" value="Save" />
</form>
Saving the data:
PHP Code:
$blackboardtxt $_POST['blackboard'];

$fh fopen('blackboard.txt''w');
fwrite($fh$blackboardtxt);
fclose($fh); 
Retrieving the data:
PHP Code:
$blackboardtxt file_get_contents('blackboard.txt');

echo 
$blackboardtxt
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
NullPointer is online now
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Old 12-08-2010, 12:20 AM Re: Daily Update Code
buckshot5792's Avatar
Experienced Talker

Posts: 32
Name: Josh
Location: Chester, VA
Trades: 0
Thanks. I'll try that out tomorrow and let you know how it goes and if I have anymore questions.

You guys are really helpful and quick!
__________________
Nothing runs like a Deer, nothing stops 'em like a Browning!
Vegetarian - Old Indian word for bad hunter.
I wish everybody could understand a full-blooded dog hunting man.
buckshot5792 is offline
Reply With Quote
View Public Profile Visit buckshot5792's homepage!
 
Old 12-09-2010, 07:24 AM Re: Daily Update Code
Extreme Talker

Posts: 156
Trades: 0
I suppose you could have an additional directory, a blog via Wordpress which is linked to the main index via an Iframe that shows the latest developments
dagaul101 is offline
Reply With Quote
View Public Profile
 
Old 12-09-2010, 04:58 PM Re: Daily Update Code
buckshot5792's Avatar
Experienced Talker

Posts: 32
Name: Josh
Location: Chester, VA
Trades: 0
Quote:
Originally Posted by dagaul101 View Post
I suppose you could have an additional directory, a blog via Wordpress which is linked to the main index via an Iframe that shows the latest developments
That's a good idea. I'll keep that in mind for a fall back plan.
__________________
Nothing runs like a Deer, nothing stops 'em like a Browning!
Vegetarian - Old Indian word for bad hunter.
I wish everybody could understand a full-blooded dog hunting man.
buckshot5792 is offline
Reply With Quote
View Public Profile Visit buckshot5792's homepage!
 
Old 12-09-2010, 05:44 PM Re: Daily Update Code
NullPointer's Avatar
Will Code for Food

Posts: 2,815
Name: Matt
Location: Irvine, CA
Trades: 0
Quote:
Originally Posted by buckshot5792 View Post
That's a good idea. I'll keep that in mind for a fall back plan.
Using wordpress to display once piece of content is massive overkill. It should take less than twenty lines of code to implement this.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
NullPointer is online now
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Reply     « Reply to Daily Update Code
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.29525 seconds with 12 queries