Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

graffiti wall php help

Posted on 2004-04-26
7
Medium Priority
?
485 Views
Last Modified: 2012-06-23
Hello I want to make a php script for my company where I have
a wall - and people can come and post graffiti on that wall [with whatever
font and color they want] [sensor away foul language] they can overlap
each other.. but after like  50 people's post's it starts deleting the
first one made.. so there are never too many.
0
Comment
Question by:KraLord
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
7 Comments
 

Expert Comment

by:jonmullen
ID: 10929191
Honestly you are better off using flash for this, and just php to access the database for the comments, or perhabs for just 50 entries just use a flat file.
0
 

Author Comment

by:KraLord
ID: 10932421
Yes, thats true jonmullen, but do you know like what to  put in the code for the flash frames or some examples
0
 

Author Comment

by:KraLord
ID: 10983169
ok dont cry
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 1

Expert Comment

by:Random_Pete
ID: 11004604
And if you want your question to remain unanswered then insulting the moderators is a great idea ...
0
 

Author Comment

by:KraLord
ID: 11009008
who is insulting in here?
0
 
LVL 1

Accepted Solution

by:
Random_Pete earned 2000 total points
ID: 11057530
Well ... you said "ok dont cry" which sounds ... well ... insulting.

As for your question, you need to do the following. You need a "submit.php" page. It would look like this:

<PHP
if (isset($_POST["graffiti_submit"])) {
  $newrow = array(
     "name"=>$_POST["graffiti_name"],
     "email"=>$_POST["graffiti_email"],
     "message"=>$_POST["graffiti_message"],
     "color"=>$_POST["graffiti_color"],
     "size"=>$_POST["graffiti_size"],
     "x"=>$_POST["graffiti_x"],
     "y"=>$_POST["graffiti_y"]);
  /*insert here a line of code to store $newrow in a database or text file*/
}
?>
<HTML><HEAD><BODY>
<FORM METHOD="POST" ACTION="submit.php">
Type your name: <INPUT TYPE="text" NAME="graffiti_name"><BR>
Type your email address: <INPUT TYPE="text" NAME="graffiti_email"><BR>
Type your message: <INPUT TYPE="text" NAME="graffiti_message"><BR>

...and so on for the rest of the parameters - then ...

Click to submit: <INPUT TYPE="button" NAME="graffiti_submit">
</BODY></HEAD></HTML>

Now you also need the main page to display all the graffiti. It will begin by reading all the data back in from the textfile or database, into a variable called $data. How you do this will depend on how you store the data, and should probably be asked as a separate question because it's a big topic on its own. Once you have read the $data your php script will need to do this :

foreach ($data as $graffiti) {
  print "<DIV style=\"position:absolute; top:".$graffiti["y"]."px; left: ".$graffiti["x"]
   ."px; font-color: ".$graffiti["color"]."; font-size: ".$graffiti["size"]."\">".$graffiti["message"]
   ."</DIV>\n";
}

There ya go, dead simple.

0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question