Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
question about PHP
#1
In PHP, say i wanted to make a PHP file do operations to an HTML file. Say I want to store the data inputted from the box into a db, but i have to show PHP what i want to change, and by doing that, i name the list. In PHP would i point to the name? for example here's my tag...

<input type=text name=THIS value=layout width=50px>

and then in PHP i would do

$string=['THIS'];

is this correct, I'm not sure about web page programming, and i need some help

Also, can php understand to point at div tags in html? for example...

<div id=header>
<p>
paragraph here
</p>
</div>

and then in php

$string=['header'];

this last question is kind of off topic, but is helpful to know. Say i wanted to change html text on a page. How would I do that?

thanks for your help






Restored from old drupal forum, for user uid:2687 username:ehcpuser
You may reset your password to access your new account here.
Reply
#2
sorry tags didn't appear... first one was

input type=text name=THIS value=whatever

second one was

div id=header
p
paragraph goes here
/p
/div


Restored from old drupal forum, for user uid:2687 username:ehcpuser
You may reset your password to access your new account here.
Reply
#3
php can get values of tags from html pages.
such as:
&lt;input type=text name=example>

php can get value of $example, in php script.

but, be careful that,
php does not output any tag automatically.

btw, to put here some tags, use & sign, then, lt; for ex.
display program filters out &lt; sign if you write it normally.


Restored from old drupal forum, for user uid:2687 username:ehcpuser
You may reset your password to access your new account here.
Reply
#4
so it's the name... not the value which PHP points to in the HTML? for example

&<input type=text name=name value=value>

<?php
$string=['name']; //name or value... which one does PHP point to is the question
?>

thanks for your help btw

Restored from old drupal forum, for user uid:1 username:ehcpdeveloper
You may reset your password to access your new account here.
Reply
#5
&lt;input type=text name=email>

will be catched by php:
$email=$_GET['email'];

if, form method is GET,
use _POST if form method is post



Restored from old drupal forum, for user uid:2687 username:ehcpuser
You may reset your password to access your new account here.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)

Online Shopping App
Online Shopping - E-Commerce Platform
Online Shopping - E-Commerce Platform
Feinunze Schmuck Jewelery Online Shopping