
Shadowing
Members-
Posts
722 -
Joined
-
Last visited
Everything posted by Shadowing
-
Display a variable as a link inside a echo
Shadowing replied to Shadowing's topic in PHP Coding Help
Thanks alot Its all working now. I dont know why i didnt notice that search1 lol. is echoing forms the best way to do this? I was reading the php manual something about HTML_FORM is that a command i should be using instead? -
Display a variable as a link inside a echo
Shadowing replied to Shadowing's topic in PHP Coding Help
thanks for joining the conversation Andy I'm just trying to get it to display all the goauld in a list -
Display a variable as a link inside a echo
Shadowing replied to Shadowing's topic in PHP Coding Help
Im not getting anything with that code sat here for a hour looking on google for solutions. I don t know why its hard to find related stuff to what im doing -
Display a variable as a link inside a echo
Shadowing replied to Shadowing's topic in PHP Coding Help
How would I go about in displaying all the goaulds as a list I wouldnt need a while command for that right? i want it to happend as soon as the page loads. <?php $search6 = ("SELECT goauld FROM users ORDER BY goauld DESC"); $search5 = mysql_query($search6) or die(mysql_error()); while($search4 = mysql_fetch_array($search5)) { $grab_goauld = $search1['goauld']; echo "<table border=\"1\" align=\"center\">"; echo "<th>$grab_goauld</th>"; echo '</table>'; } ?> -
Display a variable as a link inside a echo
Shadowing replied to Shadowing's topic in PHP Coding Help
I fixed it!!! WHERE name needed to be goauld instead of name i read that several times and didnt notice it lol. its crazy cause i changed it to name so you could read it easier. when i was using name instead of goauld Thank you so much man. i learned alot with this problem this was my first time using the while command -
Display a variable as a link inside a echo
Shadowing replied to Shadowing's topic in PHP Coding Help
Thanks for taking the time to help me understand this. I made this more simple so i can understand whats going on here when search is hit and while fetch_array is going on it will echo grab_goauld this gives me a blank result though something huge i dont understand here <?php if(isset($_POST['search'])) { $search3 = "SELECT goauld,id FROM users WHERE name='".mysql_real_escape_string($_POST['goaulds'])."'"; $search2 = mysql_query($search3) or die(mysql_error()); WHILE($search1 = mysql_fetch_array($search2)){ $grab_goauld = $search1['goauld']; echo $grab_goauld; } } ?> -
Display a variable as a link inside a echo
Shadowing replied to Shadowing's topic in PHP Coding Help
Thanks Drummin that works very awesome what is the reason for repeating $online_name = $row['name']; I tried doing something close to what you did on another page but the echo shows up blank. whats the reason for that? <?php if(isset($_POST['search'])) { $search3 = "SELECT goauld,id FROM users WHERE name='".mysql_real_escape_string($_POST['goaulds'])."'"; $search2 = mysql_query($search3) or die(mysql_error()); $search1 = mysql_fetch_array($search2); $grab_goauld = $search1['goauld']; $goauld_name = $search1['id']; echo "<a href=\"profile.php?id=$goauld_name\">$grab_goauld</a><br />\n"; } ?> -
Display a variable as a link inside a echo
Shadowing replied to Shadowing's topic in PHP Coding Help
-
Trying to figure out how to make it so name is a link to the profile when its echo anyone know how to do this? im at a huge stand still <?php $sql = "SELECT name FROM users WHERE DATE_SUB(NOW(),INTERVAL 5 MINUTE) <= lastactive ORDER BY id ASC"; $query = mysql_query($sql) or die(mysql_error()); $count = mysql_num_rows($query); $i = 1; while($row = mysql_fetch_object($query)) { $online_name = htmlspecialchars($row->name); echo '<a href="Inbox.php">"'[$goauld]'</a>"'; ?>
-
Looking for a good tutor on making a messaging system
Shadowing replied to Shadowing's topic in Miscellaneous
Well after reading like 5 tutors and some wasnt even a tutor just throwing out scripts. Decided the best way to do it is to build my own from scratch. Cause really its the only way i'll learn anything. My only problem though is knowing how to store the mail. every time mail is sent do i create a column for each mail? and use a id it generates to allocation it for my scripts? or do you store more then one mail in a row. if so i wouldnt know how to script it to seperate mail into one row lol. -
C:\Software\XAMPP\xampp\htdocs\gate\messages\inbox.php inbox file is trying to read menu.php C:\Software\XAMPP\xampp\htdocs\gate\Users\menu.php
-
i tried the relative way it didnt work how far back on the dir do i have to go require "/users/menu.php"; this is where my folder is located C:\Software\XAMPP\xampp\htdocs\gate\Users
-
thanks guys, been wondering that for ever i like being organized.
-
so is it impossible if I have a users folder and a messaging folder located in the same folder. To have a script in the users folder reading from the messaging folder from a script in the messaging folder i thought i could just do this to read the users folder but apparently not <? require("users/menu.php"); ?>
-
Looking for a good tutor on making a messaging system
Shadowing replied to Shadowing's topic in Miscellaneous
Thanks alot. i guess guide isnt a good word to use or tutor haha should use tutorial instead -
Anyone know of a good step by step tutor or even a guide on making a messaging system? I must not not be using the correct key words when searching for one on google. Talking about sending mail to someone with in a site not a instant messager.
-
I found out what was wrong there has to be a ; at the end <?php mysql_query("UPDATE users SET forgotpd='".mysql_real_escape_string($_POST['confirm'])."' WHERE id='".mysql_real_escape_string($_SESSION['user_id'])."'"); ?> yah i was reading about null i never had any scripts when learning that messed with null so i guess fear leads me ha I"ll mess around with the NULL though thanks for that
-
lol i had a } on the end of the line i just changed that. but wierd its still giving me a } error
-
Alright decided to get rid of some stuff to help problem solve I'm getting a } error for some reason with this. if I delete the mysq1_query there is no errors <?php if (isset($_POST['change'])) { // checks if password matches confirm password if ($_POST['new'] != $_POST['confirm']) { echo 'Your confirm password does not match your password'; } else { //updates the passowrd for password recovery mysql_query("UPDATE users SET forgotpd='".mysql_real_escape_string($_POST['confirm'])."' WHERE id='".mysql_real_escape_string($_SESSION['user_id'])."'"} } } ?>
-
ahh I always wonder why some times my code boxes were huge and other time small didnt realize it was cause of the php tags. sorry about that. <?php if (isset($_POST['change'])) { // checks if password matches confirm password if ($_POST['new'] != $_POST['confirm']) { echo 'Your confirm password does not match your password'; } else { // updates the passowrd for password recovery mysql_query("UPDATE users SET forgotpd='".mysql_real_escape_string($_POST['confirm'])."' WHERE id='".mysql_real_escape_string($_SESSION['user_id'])."'") $password = md5($_POST['new']); // Updates password with Md5 mysql_query("UPDATE users SET password='".$password."' WHERE id='".mysql_real_escape_string($_SESSION['user_id'])."'") echo "Your password has been changed"; } } ?> im getting a error first on this line unexpected T_STRING <?php $password = md5($_POST['new']); ?>
-
I dont dont know why i have such huge problems understanding these "'" I really thought this below would work but it keeps giving me unexpected T_STRING error mysql_query("UPDATE users SET password='"$password"' WHERE id='".mysql_real_escape_string($_SESSION['user_id'])."'")
-
this the entire code. really appreciate you taking time out to help me <?php if (isset($_POST['surrender']) || (isset($_POST['toture']))) { if(!isset($_POST['agree'])){ echo "You need to check the box"; } else { mysql_query("DELETE FROM `users` WHERE `id`= ".(int)($_SESSION['user_id'])); // logs you out and destroys the session and redirects you to signup page header("Location: signup.php"); session_start(); session_destroy(); exit(); } } ?>
-
thanks alot Karl that works!!! I really appreciate the help now i need to figure out why it only echos "you need to check the box" when I hit toture but not surrender any ideas? if (isset($_POST['surrender']) || (isset($_POST['toture']))) { if(!isset($_POST['agree'])){ echo "You need to check the box"; } else { mysql_query("DELETE FROM `users` WHERE `id`= ".(int)($_SESSION['user_id']));
-
I must be using the wrong search terms in google cause I cant find out how to update a field to a blank spot. trying to make name blank. I thought it was just " " hope someone can please help me with this mysql_query("UPDATE users SET name = '".mysql_real_escape_string "."' WHERE id = '".mysql_real_escape_string($_SESSION['user_id']))."'";
-
Proper way of using OR with two if commands
Shadowing replied to Shadowing's topic in PHP Coding Help
Thanks guys so much! It all works now Yah im creating a way for them to reset their account too. that toggle switch idea is a good idea. I was just going to use a another data base property for that but i may do that now instead only on my 2nd week learning php lol. its pretty awesome