vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   ASP user wanting to learn a little PHP. styling and tables. (https://vborg.vbsupport.ru/showthread.php?t=201121)

Vaupell 01-08-2009 11:33 PM

ASP user wanting to learn a little PHP. styling and tables.
 
Hi i use asp and love it cause its easy.

What i do now,

Top of doc, i add a db connection or what ever, or include it..

then make my website in http/css with tables and such..
there where i want db data input i would just add <% code required %>

how ewer on php i tryed drawing a <table> on a .php page
worked fine, until i wanted to add some php code in the tables
errors upon errors.. grr :o

cant i buildt a php page like this


----start.php------

<?php connection code to whatewer
?>

<Head></head>
<body>
</br>
content bla bla bla..</br>
</br>
<table>
<tr>

<td>
Php content after this :
</td>
<td>
<?php adding some php content ?>
</td>

<td>
more Php content after this :
</td>
<td>
<?php adding some php content ?>
</td>

</tr>
</table>
</body>


--------------End.php---------

or am i way off ?

EDIT: i didnt use code tags on purpose..
specifik for this post, code is a must read ;)

Bellardia 01-09-2009 12:02 AM

You can put php inline with html provided the php itself is correct. Your HTML code itself should also be valid, including HTML tags, doctype, etc.
Also, just a note - HTTP is not a coding language it's a protocol.

Dismounted 01-09-2009 03:54 AM

Yes, you can build PHP pages like that. Not every application in the world uses a templating system like vBulletin. However, a lot do due to the ability to easily manipulate output.

luki 01-09-2009 08:18 AM

Moreover you can code like this:
Code:

<?php
if (true)
{
?>
some html code here
<?php
}
?>

But it results in kinda messy code.


All times are GMT. The time now is 01:00 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01164 seconds
  • Memory Usage 1,711KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete