
pocobueno1388
Members-
Posts
3,369 -
Joined
-
Last visited
Never
Everything posted by pocobueno1388
-
view records // edit records display blank
pocobueno1388 replied to careym1989's topic in PHP Coding Help
There should be no reason for it to be blank. Is it COMPLETELY blank, or do you at least see the text on the top of the page that says "VIEW CANDIDATES"? Try adding this to the top of your script error_reporting(E_ALL); -
How can I properly display my text
pocobueno1388 replied to HockeyDevil07's topic in PHP Coding Help
You need to use the function nl2br() when displaying it. -
[SOLVED] Trouble with passing url variable and date();
pocobueno1388 replied to aebstract's topic in PHP Coding Help
You need to use double quotes $date = date("$month 1 Y"); -
[SOLVED] Undefined Variable PHP_SELF ?
pocobueno1388 replied to stublackett's topic in PHP Coding Help
If you use $_SERVER['PHP_SELF'] the source code should be fine. I think register_globals has to be enabled in order for just $PHP_SELF to work. It's bad practice to use that anyways. -
[SOLVED] Why isn't My Database Updating ?
pocobueno1388 replied to god_zun's topic in PHP Coding Help
Change $result=mysql_query($sql); To $result=mysql_query($sql)or die(mysql_error() ."<p>With Query: $sql"); -
[SOLVED] Undefined Variable PHP_SELF ?
pocobueno1388 replied to stublackett's topic in PHP Coding Help
Try using $_SERVER['PHP_SELF']. If that doesn't work, try manually putting the URL in for the action just to see if it works. -
http://us3.php.net/array_unique
-
That shouldn't be the problem. Are you sending a header? $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; Then your mail function should look something like mail($to, $subject, $message, $headers);
-
Try using implode() $sql = "SELECT * FROM prod_list WHERE name LIKE '%$search%' OR short_desc LIKE '%$search%' OR description LIKE '%$search%' AND access_levels LIKE '%$user_level%' AND cat_id IN (". implode(',', $items) .") ORDER BY {$orderby} {$ordermeth} LIMIT {$startRange},{$endRange}";
-
So what's the problem with the output, how do you WANT it to be? The output makes sense to me if your only checking one checkbox. Is that what your doing?
-
Okay, lets try this. Erase this echo "<ol>\n"; foreach($_POST as $field => $value) { echo "<li>$field = $value</li>\n"; } echo "</ol>\n"; and put in echo '<pre>',print_r($_POST),'</pre>'; Copy and paste what that gives you.
-
Try chaning foreach($_POST as $field => $value) To foreach($_POST['category'] as $field => $value)
-
Because you set it up to be an array in your form. After the submit button is pressed, do this to see what the array contains echo '<pre>',print_r($_POST['category']),'</pre>';
-
if (strlen($string) > 16){ echo "ERROR"; }
-
How do i make the first column for each result a hyperlink?
pocobueno1388 replied to prcollin's topic in PHP Coding Help
I'm going to assume that the customer's name is a unique field in your customer table, if not...you should use the auto incremented ID for the URL. Here is how you would make it a link: echo $row['orderID']. " <a href='customer.php?name={$row['customerName']}'>{$row['customerName']}</a> " . $row['customerEmail']. " " . $row['tableSize']. " " . $row['feltColor']. " " . $row['cupHolders']. " " . $row['chipHolders']. " " . $row['sideRails']. " " . $row['paintColor']. " " . $row['woodFinish']. " " . $row['schoolLogo']. " " . $row['orderTotal']. " " . $row['estimatedCompletion']. " " . $row['completeDate']. " " . $row['deliveryInstructions']. " " . $row['deliveryDate']; I'm just going to call the page the link goes to "customer.php". Now, on the customer.php file, you need to do something like this. //grab their name from the URL $name = $_GET['name']; //do a query selecting their information from DB $query = mysql_query("SELECT fields FROM customer_table WHERE customerName='$name'")or die(mysql_error()); $row = mysql_fetch_assoc($query); //now you can start displaying their information here -
You should be getting a syntax error from your query. change it to $result = mysql_query("SELECT f_name FROM gradinfo where email ='[email protected]'")or die(mysql_error()); What's the point of these lines? while($row = mysql_fetch_array($result)) { } Take that out and replace it with $row = mysql_fetch_array($result);
-
Google should return plenty of tutorials for those.
-
The "correct" way to do it would be to insert a new row for every different medication they selected. So you would make a new table called something like "user_medications", and it would look something like userID | medicineID ------------------- 1 128 1 12 4 68 That way it just makes it easier to select the information you need. The way your doing it your going to have to select the filed, split up all the medicine ID's, then do a million queries to get specific information on each medication (which I assume is in another table). If you do it the way I described, you can get all the information you need with one query using a join.
-
Try this <?php $meds = implode(", ", $_POST['medication']); $query = "INSERT INTO table (field_name) VALUES ('$meds')"; $result = mysql_query($query)or die(mysql_error()); ?>
-
Can you explain exactly what you want to do with the values and the database? Your just going to use a foreach loop. <?php foreach ($_POST['medication'] as $med){ echo $med .'<br>'; } ?>
-
NOW() is a MySQL function that inserts the current date/time into a datetime field in the database. So they are using it perfectly fine, no need to declare a date variable.
-
What's the error? My guess to why it's not working is because you have the NOW() function in quotes. Also, your missing a parenthesis from the end. So try this instead $query = "INSERT INTO user_join (user_name, email, invited_by, date_join) VALUES ('$ufull_name', '$uemail', '$rfull_name', NOW())";
-
Your Welcome Don't forget to press solved.
-
You need to create an image map. Here is a tutorial http://www.htmlcodetutorial.com/images/images_famsupp_220.html
-
You are using POST...if you want to get a value from the URL, you need to use GET. So change <?php $ufull_name = $_POST['ufull_name']; echo "ufull_name: ". $ufull_name; echo "<br>ureferer: ". $ureferer; echo "<br>ufname: ". $ufname; echo "<br>ulname: ". $ulname; ?> To <?php $ufull_name = $_GET['ufname']; echo "ufull_name: ". $ufull_name; echo "<br>ureferer: ". $ureferer; echo "<br>ufname: ". $ufname; echo "<br>ulname: ". $ulname; ?>