-
Posts
1,008 -
Joined
-
Last visited
Posts posted by spiderwell
-
-
put this line just before the mail() line
ini_set("sendmail_from", "sending@from.com");
and see if that makes any change?
look into php.ini check values for:
SMTP =
sendmail_from =
-
first suggestion is try the javascript or ajax forums.
but surely its not too hard to create a small script that on click, triggers hiding the video div, showing the form div, if they are positioned absolutely they should appear exactly where you specify. add a timer into the script that starts when the trigger is clicked, to switch back on timeout.
javascript isnt my friend, so I can't give any code, I'm still on my first cuppa of the day
-
I vaguely recall doing something similar in asp years ago and I think I stored the 'picked cards' in an array and then each time i picked a new card, i looped through array to check it wasnt already picked.
-
it is likely you need to set
ini_set("sendmail_from", $from);
try asking also in the 3rd party scripts section, you might get a better response.
-
you might get more response in the javascript forum
-
So the curly brackets around the $row['something'] variables are an alternative to the concatenation?
I not seen this before so am curious to how & why that works.
-
woo hoo free praise
drisate has given you a prefect solution, going to book mark it for myself too.
-
it sounds like you need an identifing value associated to each page so comments can be tied to that 'pageid' or whatever you might want to call it
-
WHERE username=$username
should be
WHERE username='$username' ;
-
your form inputs are not inside the recommended <form> </form>. move your inputs to echo inside those tags
-
I think at least... your last post was very confusing.
yeah it confused me
-
do you mean something like this?
foreach ($myarray as $k => $v) { if ($v >= 6) echo $link; }
-
welcome
I found this place great already and I only signed up yesterday
-
that will return the number of rows in your query, so yes, something like this perhaps
if(mysql_num_rows($result) >= 6) echo "<a href='somelink'>link</a>";
-
this is probably better asked in the mysql forum?
-
got there in the end, thats the main thing, happy to help.
-
hehe sure, sometimes I just overlook the simplest of errors, we are all human
$page=''; if (isset($_GET['page'])) $page = $_GET['page']; switch ($page) { case "design": include ("includes/design.html"); break; case "gallery": include ("includes/gallery.html"); break; case "contact": include ("includes/contact.html"); break; default: include ("includes/home.html"); } include("includes/footer.html");
-
echo "thanks for the code markup advice";
-
also move the include footer out of the switch statement, or it will only appear in the homepage, not every page
-
yeah sorry a small typo
if (isset($_GET['page'])) $page = $_GET['page']
i only closed off one of the )
-
Okay, i was'nt paying attention, because it was late in the evening,
The variable in the form was name="picAdd" en should have been addPic.
Topic solved.
Best regards,
Martijn
If I had a dollar for everytime I spent hours looking for a silly mistake like this, I'd be very rich by now
-
page is undefined as its not a variable passed in the $_GET when you call the page first off.
wrap the whole if statement in an other if statement that has isset($_GET['page'])
personally I would do it this way:
$page;
if (isset($_GET['page']) $page = $_GET['page'];
switch ($page) {
case "design":
include ("includes/design.html");
break;
case "gallery":
include ("includes/gallery.html");
break;
case "contact":
include ("includes/contact.html");
break;
default:
include ("includes/home.html");
}
-
this should get you started:
at the top of your <form>, add this line into the echo statement <input type='hidden' name='bookid' value='$bookid'>
then after the if($_POST) statement add this
$bookid = $_POST['bookid']
do the same for all variables you need to pass or you will see soon as you do this, $booktitle's value is the last one in the recordset, not the one clicked on , highlighting the same error you have with bookid currently
that should be the quickest way to get the script working without a huge reworking of the code inplace. I would suggest though that you look at refining it somewhat in the long run.
-
you are not passing a bookid in the <form> why not add a hidden input to pass the bookid, and because you dont pull that from the form, when you send the form, the value of $bookid is the one from the last row of record set, not from the form.
I hope that makes sense.
I would suggest either putting the form processing before the recordset loop or just not bother with the variables in the recordset, there is no need to do this
$bookauthor=$row['author']
<td>Author: <strong>$bookauthor</strong></td>
when you can just have
<td>Author: <strong>$row['author']</strong></td>
or even better post the form to a seperate page, then once processed, redirect back to book listing page.
can I use a value="" in a form tag to select a DB table from $_POST?
in PHP Coding Help
Posted
what about a hidden field specifying the table associated with the form?