suzzane2020
-
Posts
233 -
Joined
-
Last visited
Never
Posts posted by suzzane2020
-
-
The object
$query->
has not been created to access the functions in class Db_mysql_statement
-
What exactly is this section of code supposed to do?
//first, find out which set it's in if($i < count($setOne)){ $set_num = '1'; $temp_set_array = $setOne; $count = $i; } if(($i >= count($setOne)) && ($i < (count($setOne) + count($set_Two)))){ $set_num = '2'; $temp_set_array = $set_Two; $count = $i - count($setOne); } if($i >= (count($setOne) + count($set_Two))){ $set_num = 'e'; $temp_set_array = $encore; $count = $i - count($setOne) - count($set_Two); }
If you are trying to display the file paths , wont it be a better option to allow the user to select the file they want to upload?
you can provide an option to upload multiple files at a time.
-
Did you check if the values are available in the second page? btw the band value is not being called in the else part
else{ //If not, assign other variables $year = $_POST['year']; $month = $_POST['month']; $day = $_POST['day']; $date = create_date($year, $month, $day); $setOne = $_POST['setOne']; $set_Two = $_POST['setTwo']; $encore = $_POST['encore']; }
-
where are the variable values assigned?. I dont see them in the code.
-
Which form are you using to get the other variables if $_POST is not set?
-
On second thought. nope. what ur doing is absolutely fine.
-
check if its geting in the if loop (im sure u wud have done that) and if it is just try changing the way the values are passed.eg:
<input type="hidden" name="name" value="<?php echo $value;?>">
echo them in the elements. I had a similar problem before.
-
I guess its this part:
if($_POST && $_POST['submit'] == 'Submit'){
it should be if (($_POST)&&($_POST['submit']=='Submit')) { }
-
Guys please, If you have not not worked on this please let me know.
-
Hi ,
I have a problem with the google contacts API. Iam using php functions to sent HTTP requests.
I keep getting the error 'Bad Request'
Would be grateful if someone could throw some light.
Thank You,
suzzane
-
Hi ,
I have a problem with the google contacts API. Iam using php functions to sent HTTP requests.
I keep getting the error 'Bad Request'
Would be grateful if someone could throw some light.
Thank You,
suzzane
-
Thank You! and happy holidays!
-
Hi,
I have a doubt on google data API. Would there be a section to post that. I went through all the sections but got confused.
Please help!
thank you
-
could anyone tell me where to post a question about amazon payment. Iam a php coder and use amazon payment service as my payment gateway.
I have posted the issue in the amazon site but dint get the response I wanted.
I just wanted to know if anyone here has worked on this before?
** plz dont mind that i posted this here. I just dint have a clue where to!!!
-
thank you so much. It was this simple and I could not get a direct solution after so much googling.
Thanx again!
-
How do I read and output an image file using php.
I have a function that get the image path and then uses fread to read the image file.
This throws an error " supplied argument is not a valid stream resource" pointing to the fread
I found out we need the header("Content-type: image/jpg")
but not sure about the rest of the code.
Could anyone plz help?
thank you
-
Place the showinfo function on top. That will solve the problem.
-
yeah you could use ajax. If you would lik to stick with php for nw u can do that too witha little bit of javascript.
The form can be divided into two. have the login filed in a separate form and the rest of the fields in another form
eg:
<?php if(isset($_POST["check"])) { $user = $_POST["user"]; } ?> <form action="register.php" method="POST" name="form1"> <tr> <td class="textsr">Username*</td><td><input name="user" type="text" class="textbox" value="<?php echo $user;?>"> <input name="check" type="submit" value="check availability" class="button"> </td> <tr> <td></td> <td class="textsr"> <?php if(isset($_POST["check"]) && ($_POST["user"]!="") && (trim($_POST["user"])!='')) {$user=trim($_POST["user"]); $res=mysql_query("select * from table where username='$user'"); $trows=mysql_num_rows($res); if($trows==0) { echo "<font color='green'>The username is available</font>"; } else { echo "<font color='red'>The username is not available.<br>Please select another one</font>"; } }else { echo ""; } ?> </td> </form>
This way you can have the message appear right under the username box.
-
Thers the foreach loop.
I guess you would have to go through a few basics to get a smooth flow in coding.
php.net is the best place for a start
-
Yes you can use a space. Use it just after u get the post value.
$HTML = $_POST['html'];
$url_array = explode(" ",$HTML);
-
Hi,
Your code does not have the function to split more than 1 url. Everything is taken as a single string. You could use the explode function.
Have a note for the users that they need to use a separator like comma for the urls
-
ok. Will try searching gogle. Hope to find a solution.
Thank you guys!!
-
Yes, Thats exactly what i want to do. And as I would be reading the contents of a file and passing that as the string, there would a lot more tags than the bold. <html><head>....etcIs there a way to do that.
-
Hi friends,
I had a doubt regarding the gd library functions in php. This is what iam trying to do:
I need to read contents from a html file and convert that to an image uding the gd functions. I can get the code to work using simple text(without html tags) but not without them.
How do I convert the contents of the file which has html tags to an image.
This is the code i have been using:
<?php header ("Content-type: image/png"); $handle = ImageCreate (400, 400) or die ("Cannot Create image"); $bg_color = ImageColorAllocate ($handle, 255, 0, 0); $txt_color = ImageColorAllocate ($handle, 0, 0, 0); ImageString ($handle, 5, 5, 18, "<b>hello</b>", $txt_color); ImagePng ($handle); ?>
I would really appreciate it if someone could help.
Thank You
PHP class help
in PHP Coding Help
Posted
It would be better to have a separate class for the connection and queries.
You have created the $db object for the connection class correctly.
So for the second class which will contain all the functions for a query create an object like this:
$query =new Db_mysql_statement();