Jump to content

is PW suitable?


mrsin
 Share

Recommended Posts

I wish to develop a site where users register/login to their own area where they can make/update their own profile page could will contain multiple fixed field types including images. And these profiles need to be visible without the need to logging in. Is Pw a suitable platform for quickly building such a site or will it be a case of reinventing the wheel if choose to use PW?

Link to comment
Share on other sites

What experience do you have ? Designer, coding, api, scripts ? We'll with processwire a coder can do this in half an hour. A designer can do it in half a day if you study the processwire api. Anyway processwire is the best shortcut to your goal. Obviously you haven't searched the forum because your question is already many times answered in the past there.

Link to comment
Share on other sites

What experience do you have ? Designer, coding, api, scripts ? We'll with processwire a coder can do this in half an hour. A designer can do it in half a day if you study the processwire api. Anyway processwire is the best shortcut to your goal. Obviously you haven't searched the forum because your question is already many times answered in the past there.

I'd be hesitant to say that that sort of functionality would take half an hour. That said, ProcessWire is an excellent choice for creating this sort of site as it has a very strong and easy to use API. You would be coding this yourself however, there is no plug-and-play solution.

If you are happy with that idea then there are lots of examples and people on here who'd be very happy to help you out.

As a flavour:

<?php

// Starting variables

$out = "<h3>Please fill in the form below</h3>";
$error = 0;

// Check if form is submitted

if ($input->post->submit_form) {

// Sanitize form input

$name = $sanitizer->text($input->post->name);
$email = $sanitizer->email($input->post->email);
$phone = $sanitizer->text($input->post->phone);

// Check for errors

if (empty($name) || empty($email)) {

	$error = 1;
	$out = "<h3>Please provide a name and email address</h3>";

}

// If no errors, process the form

if ($error == 0)

	// Turn off output formatting before editing page values
	$page->of(false);

	// Set the new page values
	$page->title = $name;
	$page->email = $email;
	$page->phone = $phone;

	// Save the page
	$page->save();

	$out = "<h3>Thanks for submitting the form.</h3>";

}

?>

<?php echo $out; ?>

<form action="./" method="post">
	
	<label for="name">Name</label>
	<input type="name" name="name">

	<label for="email">Email</label>
	<input type="email" name="email">

	<label for="phone">Phone</label>
	<input type="text" name="phone">

	<input type="submit" value="Submit" name="submit_form">

</form>
  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...