![](https://forums.phpfreaks.com/uploads/set_resources_1/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
sebastiaandraaisma
-
Posts
60 -
Joined
-
Last visited
Never
Posts posted by sebastiaandraaisma
-
-
Thank you for you reply, yes that is correct. I know value A and get this value displayed correctly. And like your drawing shows is value A mentioned as an id in table 2. In table 2 the id is connected to a number which is the id in table 3 and in table 3 that id is connected to a word. And that word should replace value A in my variable $row->countryid.
Its sounds quite complicated like the friend of my friend's friend
But that's basically what it is.
Thank you for your reply, I will now experiment a little and see how it goes.
Kind regards,
Sebas.
-
Hi, I have a little problem with an array
Right now I have the working code:
echo '<td>' . $row->countryid . '_' . 'agent' . '-' . $row->memid </td>';
The problem I have is that $row->countryid contains a number, this number is related to a number in a different table which is connected to a name in a third table (unbelievable).
Table 1 Table 2 Table 3
So basically it looks like this: variable > number > text
Let me tell you that it was a "professional" company who had designed the database.
I won't mention any names, but I would not reccomend Hyperskins AB from Sweden.
Anyways, as you probably guessed, I need the variable $row->countryid to hold the text from table 3.
If some one could give me some directions, that would be great!
All help is appreciated!
Kind regards,
Sebastiaan
-
No problem,
Thank you for taking the time looking into it and your honest advise.
I have no Idea why they did things the way they did.
I mean I'm a beginner, but I could allread after reading one chapter of Sams php course see the mistakes they made. (at that point the website had allready been paid for)
No, they will not give me money back, I can ensure that!
They feel like they did enhaugh.
But that's ok, I will do my best, try to learn a little and if it realy doesn't work I will pay them one more time and that's it!
Thank you for your time (interesting Blog you have)
Kind regards,
Sebas.
-
The website is a real estate listing site www.globalhome[dot]eu, these particular files are the pages that allowes someone to list theire property. At the moment it is devided into to pages, I'm trying to get it all on one page so that I can try to implement my new layout (by myself
)
I will attach the index, its not that big, but I think it won't contain the data you need
[attachment deleted by admin]
-
Oh, yes I'm sorry for mentioning that.
I think its to much to read and to ask for. I did contact the programmers for support but they did not want to give it for free and sinds they are not realy competent I did not feel like it was a value for my money.
Its interesting that you always seem to reply so quick. I was just on your website filling in your form to ask you for a price quote in case I can't figure it out myselve. I rather pay an expert than the company that has build our website
-
Hi I have 2 php files and try to merge them into 1, the problem is that chunks of information are beeing posted to the second one. They all end up in a hidden form. Im wondering if there is an easy way to get all of this into one script.
For example:
Page 1: <input type="hidden" name="pname" value="<?=$_POST["name"];?>">
and on page 2 I find: <input type="hidden" name="pname" value="<?=$_POST["pname"];?>">
There are a lot of these post fields so I won't list them all. I just try to understand the website I bought. I would like to merge these two files into one and think I have to start with desolving these post variables.
Unfortunatley the programmers who made this did not use any comments, I did some changes that improved the system a bit but I'm still a beginner.
Any advise?
All advise is welcome!
Kind regards,
Sebas.
[attachment deleted by admin]
-
Thank you all for your input, it solved the problem!
-
Hi,
I try to echo out the following:
if ($timezone != "NULL") { //If a timezone is available for this country, show time echo "<tr> <td><span class="style3"> Local time in echo ".$time."</span> </td> </tr>" }
I get an error because of the double quotes in class="style3"
I tried the following:
<?php if ($timezone != "NULL") { //If a timezone is available for this country, show time echo ?> <tr> <td><span class="style3"> Local time in <?php echo $time?></span> </td> </tr> <?php } ?>
But still got an error.
My intention is to show the table cell only when var $timezone has been defined.
I read trough my MySQL & PHP bible but could not find the answer
All help is apriciated.
Kind regards,
Sebas.
-
Thank you, that's a good advise.
I will give it a try ;)
Kind regards,
Sebas. -
Hi, I have a question.
Is it safe to create (add) a new column to an excisting table? I would want to add it at the end (far right) of the table and was wondering if it could give conflicts with excisting quiries in the website, if they somehow need to be updated or if I can just go ahead without any problems?
Thanks in advance!
Kind regards,
Sebas. -
Hi, is there a way to determining the visitors OS language?
I did a search but could not find any info regarding this.
Any info is welcome :)
Kind regards,
Sebastiaan -
Hello and thank you for answering!
Hm.. than I need a different solution I think as I do not have access to the php.ini, my.ini or the httpd.conf.
Is there another way, for example can I make a template page ore something (on line) that is like a form, than the off line version just puts the data in the form and I press "send" and the database gets updated with the data I had off line?
Any sugestion or advise is welcome as I'm just a beginner :)
Kind regards,
Sebastiaan
-
Yes, you are both right. It was not my intention to echo something inside a variable but echo the variable :)
I'm just verry new and though that this was the proper way to insert strings and variables inside a new one.
I have tried both your solutions (single quotes and double quotes) I no longer get the echo error but now I see this one:
Parse error: syntax error, unexpected ','
The code looks now like this:
$title = "<strong>".($row1["sellrenttext"]).", ".($row2["typeofobjecttext"]).", ".($row3["city"]).", ".($row4["countrytext"]).", ".($row5["price"], 0, ',', ' ')." ".($row6["currencycode"])."</strong><BR><BR>".($row7["objectdes"]);
I also tried:
$title = '<strong>'.$sellrent.', '.$typeobject.', '.$city.', '.$country_1.', '.$currency.'</strong><BR><BR>'.$short_des;
Hereby I had extracted the variables and created new ones, sounds complicated I know ;)
What I try to accomplish is that it generates some text inside a variable that I will use for a google map on my website :)
I just need to get this variable to work before I can experiment any further :)
All advise is apriciated and welcome.
Kind regards,
Sebas -
I now tried:
$title = $var = echo "<strong>".($row1["sellrenttext"]).", ".($row2["typeofobjecttext"]).", ".($row3["city"]).", ".($row4["countrytext"]).", ".($row5["price"], 0, ',', ' ')." ".($row6["currencycode"])."</strong><BR><BR>".($row7["objectdes"]);
and also:
$title = echo
instead of $title = $var = echo
But I get the same "Parse error: syntax error, unexpected T_ECHO" error on this line.
I must be doing somrthing wrong, its just that I can't see what :)
Any help is welcome!
Kind regards,
Sebastiaan -
Thank you for your help, I will experiment a little with your sugestion :)
-
HI I could use some advise for my variable :)
I'm using:
$title = echo "<strong>".($row["sellrenttext"]).echo ", ".($row["typeofobjecttext"]).echo ", ".($row["city"]).echo ", ".($row["countrytext"]).echo ", ".($row["price"], 0, ',', ' ').echo " ".($row["currencycode"]).echo "</strong>".echo "<BR><BR>".($row["objectdes"]);
But I get a Parse error on this line telling me
Parse error: syntax error, unexpected T_ECHO
I was wondering if I could place an echo in a variable or if I maybe forgot something here?
(I'm a newbee) ;)
Any advise is welcome!
Sebas. -
Thank you for your help! :)
How do I activate the start slave on the server if the server space I rent does not give me access to the config files? Can this be done trough a .htaccess file or does it require something else?
Thanks in advance!
Sebas -
Thank you for such a quick reply!
If I put the on line version as a slave, can it still process data that other users put in on our on line website? -
Hi, I have a small question.
Is there a program maybe that allowes the on line database to be synchronized with the off line version?
The reason I'm asking is that I would like to take my laptop to clients, fill the database off line as there is not always a wifi area in the naibourhood, than in the evening when I'm connected press a button and transfer the data of the day into the on line database.
I have an Apache server, MySQL and PHP installed on my laptop. I have our website off line (not working as I most likely mised something in one of the configuration settings) but it would be great to work off line and just place everything into the on line database as soon as I'm connected to the internet.
Any sugestion is welcome!!!
Kind regards,
Sebastiaan -
This message got moved because I placed it in the wrong forum. I now see a lot of messagse posted here that I would like to read first. So no answer is required on my question (I don't know how to delete a posted message)
-
Hi, My question is what should I write in the .htaccess file to get my website indexing improved.
The webdesigners we hired for the job are allready paid and don't want to do it anymore (for free).
So, I'm on my own here. I know they have added a .htaccess file to over-ride the 30 sec time out for php scripts (used for photo uploading and resizing) and I was wondering if I can somehow just implement the mod_rewrite in there to get rid of the "?" and "&" symbols in my urls.
Is it just a simple thing to do or is it quite complicated? The only text google indexed from my site was the values from the drop down box called countries.
Any advise for a newbee here? :)
Are there any risks of ruining the database or can this be done safely?
Kind regards,
Sebastiaan -
It works!!!
Thank you so much. It might be a small thing to you but it means a lot to me.
I wish I had the knowledge to help others but in time this will be I hope :)
Thanks again! -
Wow, such a quick reply!!!
I will try it imideatley! :)
Thank you -
Everything seems to work on-line so I guess its some configuration in MySQL, PHP or Apache :)
Anyways, a different question.
What if I don't want to echo it out but convert the result into a new variable like this:
// This section retreives the country id number for the listed object
$result1 = mysql_query("SELECT * FROM objects WHERE `id`='$objid'") or die(mysql_error());
while(mysql_fetch_assoc($result1)){
$country_id = $result1['countryid'];// This is the new variable that holds the country id for the object
}
I got an error that the variable was not defined. What should I write instead?
Thanks in advance!!! :)
Sebas.
[SOLVED] Array question
in PHP Coding Help
Posted
I have some additional information that might make it easier to understand.
I tried some variations but it didn't work for me (most likely I'm doing something wrong).
I wont have much time to experiment today as I'm moving to a new apartment (with no internet connection there yet), but I will definitely try to read the messages during the breaks![:)](https://forums.phpfreaks.com/uploads/emoticons/default_happy-01.gif)
My last attempt was:
This attempt did not work.
My old code gives me a list like this:
268_agent-34
371_agent-19
271_agent-28
etc.
etc.
All help is appreciated.
Kind regards,
Sebastiaan