TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,911
  • Total Topics: 21,307
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 637
  • Total: 637

[Done!] Join Us! form

Started by mebymyself, October 19, 2006, 08:10:13 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

mebymyself

after including  Subs.php I went little further but again missing some required functions

here the require_once ... part of the file now:



....

require_once(dirname(__FILE__) . '/Settings.php');
require_once($sourcedir . '/Subs.php');
require_once( $sourcedir .'/Subs-Post.php');
require_once($sourcedir . '/QueryString.php');
require_once($sourcedir . '/Errors.php');
//require_once($sourcedir . '/Load.php');


.....


the error now is:
Fatal error: Call to undefined function cache_get_data() in /home/wowaao/public_html/Sources/Errors.php on line 146

when I uncomment  require_once($sourcedir . '/Load.php');

I got just blank page - no errors ....

JPDeni

Where is this code? Is it in a TP php block or article or is it something external or are you trying to create a new SMF function?

mebymyself

well,

Its external enroll.php file wich is included into the article

include('enroll.php');

JPDeni

Have you ever got the form to print out by using the "include" in the article? I've never used anything like that, so I don't know how it would work. I just put my code directly into articles.

mebymyself

You can see here how it works
You need to log in
username:test
password:test

mebymyself

actually I tried  to put directly into the article but I dont know how to handle this:



<form action=? ? ? ?  method="post">



Assistance

if u get this working could u repost the entire How To: please
I would like this addition aswell

mebymyself

Assistance,
Of course  I will - my little 2 cents to this great software!!!

--------------
probably i will end up just copying sql statements from createPost function into my code and executing it directly

JPDeni

You would just use "index.php?page=19" in the form action tag.

Change
} else { // Display the form

?>

<form action="enroll.php" method="post">

to

} else { // Display the form
 echo '
<form action="index.php?page=19" method="post">


and change



<?php
// Close the main IF_ELSE.
?>


to

} // Close the main IF_ELSE.


and take out that first <?php line. :)

The only thing you need to worry about is if you've got apostrophes in your form. I didn't see any, but I didn't look really close, either.

So you can get the form to print out, except when you include Load.php? That probably won't be a factor if you have it in an article, because it'll already be in Load.php.

mebymyself

Ok, I'll try to put it directly to article
Just ...can you help me to convert those piece of php blocks so it integrates with echo statement?



<TD><INPUT id="real_name" name="real_name" type="text" value ="<?php if (isset($_POST['real_name'])) echo $_POST['real_name']; ?>" /></TD>


This website is proudly hosted on Crocweb Cloud Website Hosting.