Solved

Amazing shape

Posted on 2003-11-11
9
378 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
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 

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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying 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

Suggested Solutions

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…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
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 …

790 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