?
Solved

Amazing shape

Posted on 2003-11-11
9
Medium Priority
?
383 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
7 Comments
 
LVL 13

Accepted Solution

by:
lozloz earned 1000 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 1000 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
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.

 

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
This holiday season, we’re giving away the gift of knowledge—tech knowledge, that is. Keep reading to see what hacks, tips, and trends we have wrapped and waiting for you under the tree.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses
Course of the Month13 days, 15 hours left to enroll

809 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