Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > RocketCake
PHP in form

smidejongh
Registered User
Quote
2017-07-20 14:55:34

Hi, I'm an newbee in PHP.
20 years ago I created a website with Microsoft FrontPage.
Now I'm building a new site with RocketCake. It seems to be easy but the programm does not act what I want.

When I upload the site and there is a mistake in the code, the website says what is wrong and on witch line.
In RocketCake, if I show the HTML code I don't see the line numbers. Is there a posibilety to show the line numbers?

To send the form is working with the standard code:
$text = "";
foreach($_POST as $name => $value)
{
  $text .= "$name : $value\n";
}

if ($text != "")
{
mail("********@hotmail.com", "Contact formulier vanaf websitel", $text);
}

I want 2 things to change because I use another form (reserveren) also:
1) I want to change the way to program the fields to send the form, something like this:
if (isset($_POST["submit"])) {
$name = $_POST['name'];
$email = $_POST['email'];
I tried this one but this doesnt work.

2) After push the 'send' bottum I want to rederect to another page (thanks) with more info.

My website (test site) is: http://www.smidejongh.esy.es

Thanks for your responce.


niko
Moderator
Quote
2017-07-21 04:51:56

Showing line numbers is a good idea, thanks for the suggestion. You can do this now by publishing your website to local disk and look into the file then.

The code you posted seems to be half of it, so difficult to say what doesn't work for you.

For sending to another page, just set the action of the form in the property window to that page. You then of course need to put the PHP code onto that page.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Intern?tional" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact