Jump to content

including specific data from another file

Recommended Posts

I need to pull in specific data under if/else statement in another file.


The data is pulled via AJAX to create a dynamic form, but I'm also trying to pull the same data to create a static form for people without javascript enabled. So they would click a link and reload the entire page instead of a radio button and AJAX. The AJAX is trigger via signup.php?ajax&signup_type=$form_type.


Right now the else statement is triggering and I am getting the base form to display. But if I add ?signup_type=music to the URL, nothing shows up other than the elements that are already hard coded into the primary page.


Be sure to turn Javascript off:



Here's what I'm trying to do:


	$content.= include 'signup.php';
	$content.= include 'signup.php';
	$content.='	</noscript>



Here's signup.php

$content2.='Test4 G';
$content2.='<div class="register_form_wrapper">
		<p class="register_form_position">
		<label for="register_email"><span class="register_form_text">Email:</span></label> <input type="email" value="'.$_SESSION['register_email'].'" name="register_email" id="register_email" class="register_form" />
		<p class="register_form_position">
		<label for="register_fname"><span class="register_form_text">First Name:</span></label> <input type="text" value="'.$_SESSION['register_fname'].'" name="register_fname" id="register_fname" class="register_form" />
		<p class="register_form_position">
		<label for="register_lname"><span class="register_form_text">Last Name:</span></label> <input type="text" value="'.$_SESSION['register_lname'].'" name="register_lname" id="register_lname" class="register_form" />
		<p class="register_form_position">
		<label for="register_check_email"><span class="register_form_text">Re-enter Email:</span></label> <input type="email" value="'.$_SESSION['register_check_email'].'" name="register_check_email" id="register_check_email" class="register_form" />
		<p class="register_form_position">
		<label for="register_password"><span class="register_form_text">New Password:</span></label> <input type="password" value="'.$_SESSION['register_password'].'" name="register_password" id="register_password" class="register_form" />
		<p class="register_form_position">
		<label for="register_check_password"><span class="register_form_text">Re-enter Password:</span></label> <input type="password" value="'.$_SESSION['register_check_password'].'" name="register_check_password" id="register_check_password" class="register_form" />
		<p class="register_form_position_gender">
		<label for="register_gender">Gender:</label>
		<select name="register_gender" id="register_gender">
		<option value=""></option>
		<option value="Female">Female</option>
		<option value="Male">Male</option>
		<p class="register_form_position_birthday">
		<select name="register_month" id="register_month" onchange="sndReq(register_year.value,this.value);">
		<option value="">Month</option>
		<option value="January">January</option>
		<option value="February">February</option>
		<option value="March">March</option>
		<option value="April">April</option>
		<option value="June">June</option>
		<option value="July">July</option>
		<option value="August">August</option>
		<option value="September">September</option>
		<option value="October">October</option>
		<option value="November">November</option>
		<option value="December">December</option>
		<select name="register_day" id="register_day">
		<select name="register_year" id="register_year" onchange="sndReq(this.value,register_month.value);">

echo $content2;

return $content2;



I tried using a full URL with the query string directly in an include, and my webhost has that kind of include turned off.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.