Note that there are some explanatory texts on larger screens.

plurals
  1. POno space between words in mysql?
    primarykey
    data
    text
    <p>I just looked at my MySQL data not all the words are joined up! For example if the word are <code>David Greene</code>, it will show them as <code>DavidGreene</code>.</p> <p>How can I put the space where there should be one?</p> <p>The data is dynamic by the way. Edit: here is the code:</p> <pre><code>&lt;?php $errorMsg = ""; // First we check to see if the form has been submitted if (isset($_POST['username'])){ //Connect to the database through our include include_once "scripts/connect_to_mysql.php"; // Filter the posted variables $username = ereg_replace("[^A-Za-z0-9]", "", $_POST['username']); // filter everything but numbers and letters $country = ereg_replace("[^A-Z a-z0-9]", "", $_POST['country']); // filter everything but spaces, numbers, and letters $state = ereg_replace("[^A-Z a-z0-9]", "", $_POST['state']); // filter everything but spaces, numbers, and letters $city = ereg_replace("[^A-Z a-z0-9]", "", $_POST['city']); // filter everything but spaces, numbers, and letters $accounttype = ereg_replace("[^a-z]", "", $_POST['accounttype']); // filter everything but lowercase letters $email = stripslashes($_POST['email']); $email = strip_tags($email); $email = mysql_real_escape_string($email); $password = ereg_replace("[^A-Za-z0-9]", "", $_POST['password']); // filter everything but numbers and letters $passport = ereg_replace("[^A-Za-z0-9]", "", $_POST['passport']); // filter everything but numbers and letters // Check to see if the user filled all fields with // the "Required"(*) symbol next to them in the join form // and print out to them what they have forgotten to put in if((!$username) || (!$country) || (!$state) || (!$city) || (!$accounttype) || (!$email) || (!$password) || (!passport)){ $errorMsg = "You did not submit the following required information!&lt;br /&gt;&lt;br /&gt;"; if(!$username){ $errorMsg .= "--- User Name"; } else if(!$country){ $errorMsg .= "--- Country"; } else if(!$state){ $errorMsg .= "--- State"; } else if(!$city){ $errorMsg .= "--- City"; } else if(!$accounttype){ $errorMsg .= "--- Account Type"; } else if(!$email){ $errorMsg .= "--- Email Address"; } else if(!$password){ $errorMsg .= "--- Password"; } else if(!$passport){ $errorMsg .= "--- Passport"; } } else { // Database duplicate Fields Check $sql_username_check = mysql_query("SELECT id FROM members WHERE username='$username' LIMIT 1"); $sql_email_check = mysql_query("SELECT id FROM members WHERE email='$email' LIMIT 1"); $username_check = mysql_num_rows($sql_username_check); $email_check = mysql_num_rows($sql_email_check); if ($username_check &gt; 0){ $errorMsg = "&lt;u&gt;ERROR:&lt;/u&gt;&lt;br /&gt;Your User Name is already in use inside our system. Please try another."; } else if ($email_check &gt; 0){ $errorMsg = "&lt;u&gt;ERROR:&lt;/u&gt;&lt;br /&gt;Your Email address is already in use inside our system. Please try another."; } else { // Add MD5 Hash to the password variable $hashedPass = md5($password); // Add user info into the database table, claim your fields then values $sql = mysql_query("INSERT INTO members (username, country, state, city, accounttype, email, password, passport, signupdate) VALUES('$username','$country','$state','$city','$accounttype','$email','$hashedPass','$passport',now())") or die (mysql_error()); // Get the inserted ID here to use in the activation email $id = mysql_insert_id(); // Create directory(folder) to hold each user files(pics, MP3s, etc.) mkdir("memberFiles/$id", 0755); // Start assembly of Email Member the activation link $to = "$email"; // Change this to your site admin email $from = "admin@somewebsite.com"; $subject = "Complete your registration"; //Begin HTML Email Message where you need to change the activation URL inside $message = '&lt;html&gt; &lt;body bgcolor="#FFFFFF"&gt; Hi ' . $username . ', &lt;br /&gt;&lt;br /&gt; You must complete this step to activate your account with us. &lt;br /&gt;&lt;br /&gt; Please click here to activate now &amp;gt;&amp;gt; &lt;a href="http://www.netolancer.co.uk/bitcoin/activation.php?id=' . $id . '"&gt; ACTIVATE NOW&lt;/a&gt; &lt;br /&gt;&lt;br /&gt; Your Login Data is as follows: &lt;br /&gt;&lt;br /&gt; E-mail Address: ' . $email . ' &lt;br /&gt; Password: ' . $password . ' &lt;br /&gt;&lt;br /&gt; Thanks! &lt;/body&gt; &lt;/html&gt;'; // end of message $headers = "From: $from\r\n"; $headers .= "Content-type: text/html\r\n"; $to = "$to"; // Finally send the activation email to the member mail($to, $subject, $message, $headers); // Then print a message to the browser for the joiner print "&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;OK $firstname, one last step to verify your email identity:&lt;/h4&gt;&lt;br /&gt; We just sent an Activation link to: $email&lt;br /&gt;&lt;br /&gt; &lt;strong&gt;&lt;font color=\"#990000\"&gt;Please check your email inbox in a moment&lt;/font&gt;&lt;/strong&gt; to click on the Activation &lt;br /&gt; Link inside the message. After email activation you can log in."; exit(); // Exit so the form and page does not display, just this success message } // Close else after database duplicate field value checks } // Close else after missing vars check } //Close if $_POST ?&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload