Solved

Amazing shape

Posted on 2003-11-11
9
375 Views
Last Modified: 2008-03-06
Hi guys,
I do not know if this is the right place to post this but I did
not know what to do.
I am trying to draw the shape below using the HTML text field
as each square is a text field even the shapes that look together
like a permid they are (suppose to be text fields rotated 45 degrees).

The user will have to insert values inside these text fields.

I am using PHP and MySQL.
I know this is something crazy but this is what I have to do

Any help will be appreciated.
Links books any thing.
Thank you in advance.

      /\
     /\/\
    /\/\/\
   /\/\/\/\
  /\/\/\/\/\
 /\/\/\/\/\/\
/\/\/\/\/\/\/\
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
0
Comment
Question by:FNajjar
  • 4
  • 2
9 Comments
 
LVL 13

Accepted Solution

by:
lozloz earned 250 total points
ID: 9723205
hmm so the /\ represents one text field rotated 45 degres an | | represents a normal text field? as far as i know you can't rotate elements in a form (i've never seen it).. can you tell us what you're trying to do so we might be able to suggest some alternatives?

cheers,

loz
0
 
LVL 14

Assisted Solution

by:ThG
ThG earned 250 total points
ID: 9723317
very simple recursive algorithm! This really sounds as school/college homework, so i'm not going to do that for you, but i'll help in writing the code.

Basically they're 3 nested fors:

for ($i = 1; $i <= $len; $i++) {
  for ($j = 1; $j <= $len - $j; $j++) {
    print " ";
 }
 ...
}

i'll let you complete it!
0
 

Author Comment

by:FNajjar
ID: 9723344
You got the idea right,

It is suppose to be a simple program with no calculations that I only need to draw the table
on a web page and the user will have to insert his values in the shape you've seen
of course the shape is a dynamic shape according to the number of rows and columns
the user will set at the begining of the program.

I thought of drawing the square shape in photoshpo then rotate it 45 degrees then read the
image inside each cell of the table and inside that i will put the text field...   :) crazy ha

I couldn't think of any thing else, can you.
Thank you.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:FNajjar
ID: 9723381
I am not worried about the shape but as I said they are text fields they are not just /\ slashes
and these text fields will have values inserted by the user.

At school/college homeworks they use to tell us read the question carefully.
I will be more than happy if it turns to be a school/college homework - beleive me... :)
0
 

Author Comment

by:FNajjar
ID: 9724613
Okay guys,
Does anyone know if this could be done in any other language
I'm willing to do any thing to make it work.
Thank you.
0
 
LVL 13

Expert Comment

by:lozloz
ID: 9724897
as i said, i can't think of any way to rotate an html object, let alone an input field. you'd probably be best off moving this to the javascript forum to see if they have any answers

loz
0
 

Author Comment

by:FNajjar
ID: 9725432
Okay,
Thank you guys much.
I'll try Javascript.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
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.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now