User Profile
Collapse
-
I solved the problem. It was the previous field which broke the insert statement. -
weird insert problem
I have a query like this
Code:INSERT INTO table (name,count) VALUES ('test',2)
I made the table copying it from an older table where the count field... -
I understand now but then you need to have only one form for that to work
[PHP]
<?php
if(isset($_POST['send'])){
foreach($_POST['send'] as $buttonvalue){
if(is_numeric($ _POST['quantity_'.$bu ttonvalue]) && $_POST['quantity_'.$bu ttonvalue] > 0){
echo $_POST['quantity_'.$bu ttonvalue].' x '.$buttonvalue. '<br>';
// database code and count...Leave a comment:
-
what is your favicon code? i believe you have to use rel="SHORTCUT ICON" with capital letters...Leave a comment:
-
for inline links you only need #linkname. if you want to link from outside the page you have to do it in javascript because you have to specify the dom. It's been so long ago i used frames if forgot the code for frames :)
It's not good practice to put your content in an iframe because bots don't register it then. Use a server side language to stitch the page parts together this will be better for your site and if you want to limit...Leave a comment:
-
-
I think the ?gim part doesn't get processed by php. You just get the src attribute.
In the first example you get no value because php sees gim='home1' as a new attribute. In html it's not wrong to add attributes that aren't part of the specifications. It's not a technique that is to be encouraged but browsers just look over those attributes....Leave a comment:
-
You have two inputs called pid, i think that is the problem. The easy way to do a tablebased item submit is using the button tag
[HTML]<button type="submit" name="pid" value="'.$row['p_id'].'">ADD</button>[/HTML]
This way you don't have to use hidden fields and you can put the table in one form instead of as many forms as there are items....Leave a comment:
-
as far as i can tell in php it would be something like this
[PHP]
function texttool($tool) {
$tool = strtolower($too l);
$toolarr = split(' ',$tool);
$toolarr2 = array()
foreach($toolar r as $word){
$tit1 = $word;
$tit2 = $word;
$tit2 = substr(strrev($ tit2),0,strlen( $tit2)-1);
$tit1 = substr(strtoupp er($tit1),0,1);
$toolarr2[] = $tit1.$tit2
}
return...Leave a comment:
-
Then i think there is no other solution then to format your date in php....Leave a comment:
-
Try it without the mysql function. Sometimes they don't work play nice with the mysql_query function.
If that is the problem you have to reformat the DOB field in php....Leave a comment:
-
you have to replace DOB by date because the query returns the alias and not the fieldname, you could add the fieldname to the selected columns but i think that is not what you are looking for....Leave a comment:
-
-
have you tried
Code:$sql="SELECT playerid, firstname, lastname, DATE_FORMAT(DOB, '%d-%m-%Y') as date FROM player order by surname";
Leave a comment:
-
i think you nean something like this
[PHP]
<form action="<?php echo $PHP_SELF; ?>" >
<select name="test">
<option value="1">test 1</option>
<option value="2">test 2</option>
<option value="3">test 3</option>
<option value="4">test 4</option>
</select><br>...Leave a comment:
-
to print an array to the screen you have to use print_r instead of echo.
Your code looks fine....Leave a comment:
-
I think if you want to pass a variable over multiple forms you put it in a session variable. This way it doesn't have to be in your form. Set the variable when you retrieve it and unset it when the last form is submitted correct....Leave a comment:
-
As i understand from your explaination you want to add the username to all of your rows. This can be done with the OnItemDataBound . I assume you add a new column to your datagrid and you use a literal with the id: username. The OnItemDataBound attribute is a part of the asp:Datagrid tag and the value is a function, lets say dataBound.
Code:<%@ Page Language="C#" %> <script runat="server">
Leave a comment:
-
[PHP]
if(isset($_REQU EST['Submit']))
{
$text = $_POST['name'];
// for the first letter
$string = preg_replace('/^([a-z]{1})/', strtoupper('$1' ),$text);
// for all following words
$string = preg_replace('/ ([a-z]{1})/', strtoupper('$1' ),$text);
echo $string;
}
[/PHP]
Which output do you get now?Leave a comment:
-
[PHP]
$text = preg_replace('/ ([a-z]{1})/', strtoupper('$1' ),$text);
[/PHP]Leave a comment:
No activity results to display
Show More
Leave a comment: