![](https://forums.phpfreaks.com/uploads/set_resources_1/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
fugix
-
Posts
1,483 -
Joined
-
Last visited
Posts posted by fugix
-
-
for starters, change these lines
<?php $row= mysql_fetch_array($rs); ?> <table border="1" summary="Customer Details"> <tr> <th>cID</th> <th>Order number</th> <th>Order Date</th> <th>Shipped</th> </tr> <?php if ($custid == $row) { ?> <tr> <td><?php echo $row["customerID";] ?></td> <td><?php echo $row["orderNumber"]; ?></td> <td><?php echo $row["orderDate"]; ?></td> <td><?php echo $row["shipped"]; ?></td> </tr> <?php } mysql_close($conn); ?> </table></body></html>
also, not sure why you are setting your post id equal to mysql_fetch_array()
-
okay glad you figured it out
-
try to make name equal to a simple string...
$name = 'test';
-
could make a table with category names as fields and insert each video in the correct field
-
you could try debugging your queries...
$getNEWid2 = mysql_query("SELECT ID FROM ".$conf['tbl']['users']." ORDER BY ID DESC LIMIT 1 ") or die(mysql_error()); WHILE ($NEWid2 = mysql_fetch_array($getNEWid2)){ $send = mysql_query("SELECT name,user,email from ".$conf['tbl']['users']." WHERE ID=$NEWid2[iD]") or die(mysql_error()); WHILE($newsiteuser = mysql_fetch_array($send)) { //emails sent here// }}
-
try to keep your function var consistent with your post var. So if your post var is $name, then your function var will be $name
class validate { function check_input($name) { $data = trim($name); $data = stripslashes($name); $data = htmlspecialchars($name); return $name; } }
-
then the admin shouldn't be so foolish as to walk away from his/her comp still logged into their account..that will always be an issue for all webpages
-
Why not just create another form for the admins
-
welcome to the forums...hope we can help you out
-
seems like your else statement is not getting triggered..therefore your mysql_fetch_array() function is trying to use an empty var
-
as project fear said above...this notice is being triggered because your form has not been submitted...what is the results that you receive when this script is ran?
-
yes i would like to know why you need to use a constant here
-
glad i could help, if you ever need further assistance we are here to help
-
you could also do something where if the user chooses to add todays date..the code will generate a hidden field with todays date, else it will process whatever date the user inserts into the field..is this data going to be entered into a database?
-
like i said, look at your insert statement, the query doesnt now where to insert the submitted data.
$sql = "INSERT INTO info VALUES (null, '$title' , '$body')";
should be
$sql = "INSERT INTO info (title,body) VALUES ('$title' , '$body')";
also need to add a " = " to this line
<label for="title">Title:</label>
<input type="text" name"title" id="title" />
labrat, you do not need to specify where to put the values as long as the values match with the fields, if you have an auto-incrementing field that you are not inserting a value into, you will need to put empty quotations for that field in your insert clause...eminempk, where is the script that is calling the functions that you created?
-
Welcome to the forums. Hopefully you will learn alot from us
-
You can also encase the var in curly brackets instead of concatenation.
-
What exactly do you mean by you want the var to be constant without concatenation?
-
Sounds like simple field validation to me. Using if else statements to filter the user input with whatever stipulations that you would like.
-
Looks pretty good. Nothing to do on it though. Will need to add a lot of functionality to it. Like the Ajax work you did on it thus far though.
-
also, might be because you are not using a relative path...are you using a localhost server? try this
<?php require_once 'example/dir/footer.php'; ?>
using the full path to the file
-
And also, put MySQL field names in backquote operators, so that it never conflicts with MySQL reserve word. E.g. "password" is a MySQL reserve word. Try this:
$user = mysql_real_escape_string($_POST['user_name']); $pass = mysql_real_escape_string($_POST['password']); $query = "SELECT * FROM `users` WHERE `user_name` = '$user' AND `password` = 'pass'"; $user_name_check = mysql_query($query);
Thanks!
actually, "password" is not a mysql reserved word...however always placing backticks around you field names will eliminate the risk of triggering an error due to using a mysql reserved word
-
glad to have ya...hopefully you can learn from the forums
-
that's correct, when you tested this did you not have any checkboxes checked?
Hide URL but still keep $_GET variables
in PHP Coding Help
Posted
you could use a post request or mod_rewrite